user541610
user541610

Reputation: 3

How can I make a java program always running?

How can I make a java program such that it is always running on the system (such as a daemon or service), but only allow one instance of the program to run? I would like it to start either when I run the program or when the system starts (either is fine).

Upvotes: 0

Views: 3769

Answers (3)

Daniel Teply
Daniel Teply

Reputation: 1974

I've used this to run a Java program as Windows service service : http://wrapper.tanukisoftware.com/ , with good results.

Upvotes: 0

Bozho
Bozho

Reputation: 597124

Take a look at commons-daemon

Upvotes: 2

Jigar Joshi
Jigar Joshi

Reputation: 240908

For First part of your Question you need to make a thread running continuously,

for second part of your question look here

Upvotes: 1

Related Questions