I\'ve just inherited a java application that needs to be installed as a service on XP and vista. It\'s been about 8 years since I\'ve used windows in any form and I\'ve neve
With Apache Commons Daemon you can now have a custom executable name and icon! You can also get a custom Windows tray monitor with your own name and icon!
I now have my service running with my own name and icon (prunsrv.exe), and the system tray monitor (prunmgr.exe) also has my own custom name and icon!
MyServiceName.exe
and MyServiceNamew.exe
respectively.Download WinRun4J and use the RCEDIT.exe
program that comes with it to modify the Apache executable to embed your own custom icon like this:
> RCEDIT.exe /I MyServiceName.exe customIcon.ico
> RCEDIT.exe /I MyServiceNamew.exe customTrayIcon.ico
Now install your Windows service like this (see documentation for more details and options):
> MyServiceName.exe //IS//MyServiceName \
--Install="C:\path-to\MyServiceName.exe" \
--Jvm=auto --Startup=auto --StartMode=jvm \
--Classpath="C:\path-to\MyJarWithClassWithMainMethod.jar" \
--StartClass=com.mydomain.MyClassWithMainMethod
Now you have a Windows service of your Jar that will run with your own icon and name! You can also launch the monitor file and it will run in the system tray with your own icon and name.