Java Project released on Tomcat server

Source: Internet
Author: User
1. the Java project runs on the server.
(1) create a project directory on the server, for example,/usr/serch. Copy the Java project to the directory and copy the jar package referenced by the project to the corresponding directory.
(2) run Java-xms256m-xmx512m-classpath/usr/search/lib/*. jar: COM. Search. class name parameter

2. Configure the following on the Tomcat server:
(1): Add the configuration file of the Java project to/usr/local/tomcat/bin. For example: copy all configuration files in the conf directory of the project to/usr/local/tomcat/bin/CONF.
(2) Modify server. XML and Web. XML in/usr/local/tomcat/conf to modify the corresponding settings. Such as: virtual path .....
(3): Create a project directory in/usr/local/tomcat/webapps and copy the Java Web project to this directory.
(4) modify the configuration file if heap overflow of the Java Virtual Machine is prompted: Tomcat error: Java. Lang. outofmemoryerror: Java heap space,
If you use win
Add the following command to/tomcat/bin/Catalina. BAT:
Set java_opts =-xms32m-xmx256m
If you use Unix/Linux
Add the following command to/tomcat/bin/Catalina. sh:
Java_opts = "-xms32m-xmx256m"

(5): copy the jar package to/usr/local/tomcat/common/lib.
Medium

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.