ruslanys
ruslanys

Reputation: 1211

How to start Java main thread like a daemon thread?

I need to start my java class like a background process without using jsvc. How could I do this?

Upvotes: 1

Views: 673

Answers (1)

aleroot
aleroot

Reputation: 72646

In linux you can easily do it with :

java -jar myjar.jar &

Under windows you can try using the javaw instead of java :

javaw -jar myjar.jar

Otherwise you will need Apache Commons Daemon service or daemon wrapper.

Upvotes: 2

Related Questions