The Linux command to run the jar package is as follows: Method 1: Features: The current ssh window is locked. You can press CTRL + C to interrupt the program, or close the window directly to exit the program. How to prevent the window from locking? Method 2 & represents running in the background. Specific: The current ssh window is not locked, but when the window is closed, the program terminates. Continue to improve, how to make the program still running when the window is closed? Method 3 nohup means running the command without interruption. When the account is logged out or the terminal is closed, the program will still run. When a job is executed with the nohup command, all output of the job is redirected to the nohup.out file by default unless an output file is specified otherwise. Method 4 Explain>temp.txt command >out.file command >out.file redirects the output of command to the out.file file, that is, the output content is not printed on the screen, but output to the out.file file. You can view background running tasks through the jobs command jobs Then all the background jobs will be listed, and each job will be preceded by a number. fg 23 View the pid of the thread occupying a port If you forget the process ID, you can use the following command to view the process ID of the currently running jar package program Or //Close the process 24204 represents the process ID found in the previous step Summarize The above is the implementation method of starting the jar package and running the jar package in the background in Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Vue achieves seamless carousel effect (marquee)
>>: Solution to 1290 error when importing file data in mysql
1. Basic Concepts 1. Sitemesh is a page decoratio...
1. Introduction CentOS8 system update, the new ve...
Step 1: Get the MySQL YUM source Go to the MySQL ...
Problem Record Today I was going to complete a sm...
Table of contents 1. Concepts related to stored p...
1. Connect to MYSQL Format: mysql -h host address...
Regarding display: flex layout, some people have ...
By turning on the Recycle Bin function, you can r...
Table of contents 01 Container consistency 02 Con...
Docker-machine is a Docker management tool offici...
The effect diagram is as follows: <!DOCTYPE ht...
Some time ago, the project needed to develop the ...
Preface The database deadlocks I encountered befo...
Table of contents 1. Lock and Latch 2. Repeatable...
Earlier, we used Docker to simply deploy the Spri...