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
This article mainly introduces Docker stop/remove...
Table of contents TypeScript environment construc...
Table of contents 1. React.Children.map 2. React....
Table of contents 1. Basic usage and logic 2. Fea...
Basic Introduction In the previous article, we in...
I always feel that translate and transition are v...
View historical commands and execute specified co...
What is a table? Table is an Html table, a carrie...
The automatic scrolling effect of the page can be...
mysql correctly cleans up binlog logs Preface: Th...
Table of contents Preface 1. Tomcat class loader ...
How to check the file system type of a partition ...
SQL Left Join, Right Join, Inner Join, and Natura...
During project development, our database data is ...
nginx installation Ensure that the virtual machin...