How to start a Java server in Linux through the console?

So, I have a Java program sitting on my DigitalOcean server, and I use this command,

java -jar IO_Server.jar

Run it. However, the problem is that when I type this command in PuTTy, it requires me to leave PuTTy open. If I close PuTTy, then the server will shut down, which is not what I want. I need a way to start the server and leave it working even after closing PuTTy.

I spent the Internet about 2 hours with no luck. I continue to run into the above team. I used the command before, but I can’t remember what it is and where I found it.

Help will be appreciated!

+4
source share
2 answers

nohup. -

nohup java -jar IO_Server.jar &

:

nohup - POSIX, HUP ().

+3

Elliott, - screen, " ", . , , , ssh , .

.

+1

Source: https://habr.com/ru/post/1612858/


All Articles