How I can run Java application at system startup on Windows/Linux/MacOS?
Any implementation of JNA/JNI shall be welcome.
Put you program in this directory: %appdata%\Microsoft\Windows\Start Menu\Programs\Startup Everything in there will be executed at startup.
JAR (Java Archive) is a cross-platform file format based on the ZIP format, which can be used in Windows, Mac OSX, Linux, Android OS and more.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With