V
V
Vanes Ri_Lax2015-08-25 07:57:11
linux
Vanes Ri_Lax, 2015-08-25 07:57:11

How to run a java program in the background?

Hello, I wrote a client-server application. I wrote the server part in java, packed everything into a jar archive. Uploaded the program to a remote server. The remote server is running CentOS 6.5.
I connect via SSH, I try to start the program like this:
java -jar programm.jar
Everything works fine, but how can I make my program run in the background, like a service in windows?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2015-08-25
@vanesxl

stackoverflow.com/questions/12102270/run-java-jar-...
or screen/tmux/etc

A
aromensky, 2019-06-05
@aromensky

>[email protected]:/home/server/BungeeCord# nohup java -jar BungeeCord.jar &
[2] 12698
[email protected]:/home/server/BungeeCord# nohup: input is ignored, output is added to 'nohup.out'
[2] ]+ Stopped nohup java -jar BungeeCord.jar
Everything works except BungeeCord

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question