Tomcat as NT Service
I recently received a query from Zena Sam based on one of my post at Javaranch on installing Tomcat as a Service. She writes:
I have seen your post about Tomcat Service in Javaranch site. I looked at the posts…am trying to a similar thing what you have tried to…call a batch file from Wise Installer that installs a tomcat service. I have tried to run the same command from command line…the service is created fine but am unable to start the service ..as it pops a message..that as the service has nothing to do…it is stopped….Can you tell me how exactly are you trying to call it from Wise…I would greatly appreciate it..
Zena, the problem may be due to the incorrect jvm.dll path that we pass to the service installer. I am not aware which jdk are us using but if you are using jdk1.3 then jvm.dll resides in jre/bin/hotspot folder of jdk installation while for j2sdk1.4.x it's in jre/bin/server folder. Make sure you pass it correctly. Also check the registry entry under HKEY_LOCAL_MACHINE/SYSTEM/Current Control Set/Services. Since the service gets installed correctly the problem may not be with Wise installer usage but with the command line parameter that is supplied to tomcat.exe. Make sure that the parameters appear exactly as you passed to the tomcat.exe while installing the service. Hope this helps!