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