Running Tomcat as a 64-bit Windows Service
Saturday, 16 June 2007 00:00

A few days back, I had a struggle getting Tomcat up and running as a Windows service. I had no problems on my local machine, but I could not get it to run on my web host nor was I receiving any helpful error messages. The most puzzling part was Tomcat would work fine when using the startup.bat script provided, but I wanted this installed as a service so that I didn't have to remain permanently logged in.

After research, it seemed the errors were related to the fact that my web host uses Windows Server 2003 64-bit. However, I was using both the 32-bit JDK as well as a 32-bit version of the Tomcat service. Here are the steps to take if you're trying to run Tomcat as a service in a similar environment:

  • Make sure you have the 64-bit JDK installed. You can find this on the Java web site, be sure to scroll to the bottom of the download page to find the "Windows x64 executable". I am using Java 6, but I am sure other versions will work just as well.
  • Next, you will need to obtain a 64-bit version of the tomcat6.exe binary. The latest location that I have seen the file is within the Tomcat SVN Repository
  • Install the service like you normally would, with a command such as service.bat install


That's all there is to it. Boot up the Apache Tomcat service and it should now run in your 64-bit environment.