Tom Klino
Tom Klino

Reputation: 2504

Running a Java application in the background of a linux server

I want to run jwebsocket server on my server. I don't have Tomcat installed and I would prefer avoiding it if possible (though it is not that essential to me). jwebsocket is a .jar application. What I do now to run it, is log in to my server via SSH, and start it. However in that way it turns the entire SSH console to it's own log, and if I want to disconnect from the SSH, I must close it first.

Is there a way to just run it in the background?

If this is not the recommended way, I would prefer to just install Tomcat. But since Tomcat is unnecessary to me besides for one specific application, I would prefer to avoid it if it is not absolutely necessary.

Upvotes: 0

Views: 3773

Answers (1)

white
white

Reputation: 1903

run it with

java -jar yourapp.jar > /dev/null &

Upvotes: 5

Related Questions