Can anyone help me in either providing me some right direction towards using yajsw using java language to use java application as service or just provide me some basic code of hello world application which i can run as service. I googled it but could not find any thing useful.
Thanks in advance
YAJSW's documentation provides everything you need here. http://yajsw.sourceforge.net/
The easiest way to get running is to execute your jar with your own start script. Then you need to figure out what PID that java process is running as. Once you have the pid all you need to do is run either ./yajsw/yajsw##someversion##/bat/genConfig.bat or if your in linux run the ./yajsw/yajsw##someversion##/bin/genConfig.sh .
If successful this will create a wrapper.conf that is targeted towards your executable jar. This is plenty to get you going and off the ground. After that you can tweak the heck out of it for your own customizations.
The (genConfig.bat or genConfig.sh)'s argument is the PID. So run genConfig.bat #PID# !
PS: The config generator will add the classpath of each jar .. when it is easier just to add one classpath as wrapper.java.classpath.1 = .\lib\* instead.