Java learning: Windows system deployment jar package operation

1. Package the jar file
1. Put the configuration file in the pro, as shown in the figure:
Insert picture description here
start to package as shown in the figure:
Insert picture description here
form a jar package after packaging, as shown in the figure:
Insert picture description here
2. Start deploying the jar package, one day on the windows system server
1. Find the file storage problem, For example: G:\tian-visit-test, put in the jar package, as shown in the figure: Insert picture description here
Run the cmd command window as an administrator, find the file location, and enter java -jar tianyin-visit.jar to run the program.

Note: If the operation fails, Web server failed to start. Port 8155 was already in use. The port is occupied, proceed as follows:
1. Open the cmd running interface first, enter netstat -ano, and check the port process ID.
Insert picture description here
2. As shown in the figure below, the process ID (PID) of port 8155 is 11316.
Insert picture description here
3. Then kill the process with that ID. Enter taskkill /F /pid PID
Insert picture description here
4. Re-command to run the jar.

Note: The cmd window cannot be closed after running!

Guess you like

Origin blog.csdn.net/weixin_41812784/article/details/109599337