First, in Eclipse, the Java program is made into a runnable jar package
1. Simply package the SRC directory and the third-party jar in the Lib directory
2. After selecting these two positions, "next", then "Finish", generate the Jar package
3. Build a ZIP package for the project structure
Then, the project into a zip package, note that only the required program directory structure and configuration folder can be
4. Click "Finish" to complete the ZIP package compression
5, the generated jar package and zip package upload to the Linux Server program installation directory (depending on the project group, the program installation directory will be different, but generally in the/usr directory),
Unzip the ZIP package and place the jar package in the extracted Lib folder
6. Write a shell program to invoke the jar package and launch the application
For example:
App_home=jar Package Path
App_mainclass= program main class full package path
Classpath=${app_home}/lib/xxx.jar:sss.jar
java-xmx3000m-xms3000m-server-d64-dfile.encoding=utf-8-dfetch.threads=300-classpath $CLASSPATH ${APP_ MAINCLASS} $ $
Java projects are made into jar packages and deployed to Linux servers, and Java programs are started in shell scripts