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
Designing navigation for a website is like laying...
Table of contents 1. List interface display examp...
1. In the control panel, uninstall all components...
[LeetCode] 196.Delete Duplicate Emails Write a SQ...
Beginners can learn HTML by understanding some HT...
Table of contents 1. Common mistakes made by begi...
After installing Docker, I encountered the x509 p...
This article example shares the specific code of ...
Table of contents for loop While Loop do-while lo...
Application Scenario In the data table, the appli...
Table of contents Install Redis on Docker 1. Find...
There are many reasons for slow query speed, the ...
1. Links Hypertext links are very important in HTM...
Table of contents 1. Check the current status of ...
Table of contents 1. forEach() 2. arr.filter() 3....