Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically adding Java app to startup

We're making a login client in Java for a school project. It uses SSH to connect a local server to allow for internet connection, for the convinience of our users we would like to be able to make an "open on startup" function.

We know that this could be done by cron/damon jobs in linux, and by service/registry methods in windows... We don't know about OS X.

We would like to CODE the solution in java, each solution doesn't have to be for all 3 OS' but just one, then they can execute when needed.

Any help would be appriciated. :-)

Regards Martin

like image 576
Martinnj Avatar asked May 12 '11 09:05

Martinnj


1 Answers

YAJSW (Yet Another Java Service Wrapper) could provide this functionality, and is licensed under the LGPL.

http://yajsw.sourceforge.net/

You'd want to create your configuration during installation I suppose, and in install/uninstall the service when the user toggles the checkbox.

You'll also find a feature matrix of other options for achieving the same thing at http://yajsw.sourceforge.net/#mozTocId284533

And for you interest, under the hood on OS X the system this uses is called launchd.

like image 68
Matt Sheppard Avatar answered Oct 20 '22 20:10

Matt Sheppard