Reputation: 4839
How I can run Java application at system startup on Windows/Linux/MacOS?
Any implementation of JNA/JNI shall be welcome.
Upvotes: 10
Views: 2791
Reputation: 26170
Take a look at http://yajsw.sourceforge.net/. It's free and compatible reimplementation of TanukiSoftware Java Service Wrapper featuring free 64-bit support.
There is also a comparison table for YAJSW, JSW, ACD and L4J.
Upvotes: 2
Reputation: 1367
Take a look at http://wrapper.tanukisoftware.org. It provides a wrapper for java applications to run under the various operating systems. You can use the community edition.
Upvotes: 4
Reputation: 41
On windows you can use reg add Add the path of your application to hklm/software/microsoft/windows/current version/run To see more ,on command prompt type reg add /? Alternatively yo can use system call to add it from your application itself
Upvotes: 3
Reputation: 1535
You can consider your application as a service under linux, and add a script that could start it under /etc/init.d (on most distributions, I think). You'll then have to make the needed links to the runlevel folders, to decide when to run your application. I think you can use chkconfig too
A basic example of script can be found here
I don't have most clues for the other two systems, however.
Upvotes: 3