How to run Tomcat 6 on WinXP 64 bit?

Srg picture Srg · Oct 17, 2008 · Viewed 46.5k times · Source

Installed Tomcat 6 on WinXP 64. It installed just fine. But when I try to launch it ( from Windows Services) I get the following error : "Can not start an the Apache Tomcat Service on Local computer." error 216:0xd8

Answer

FoxyBOA picture FoxyBOA · Nov 9, 2008

It's well known issue.

Tomcat wrapper for windows service is compiled for 32 bits JDK.

Steps that should allow you to install Tomcat as windows service under JDK64bits.

  1. Download Tomcat binary installation (zip file; exe file will not find 64 bits JDK/JRE).

  2. Extract files from the archive.

  3. Rename tomcat5.exe (tomcat6.exe) to tomcat5.exe.32bits to (tomcat6.exe.32bits)

  4. Extract 64 bits Tomcat wrapper from tomcat5_5_64bits_wrapper.zip and rename it to tomcat5.exe (tomcat6.exe). See details are here. (Update: The Bugzilla post seems to be down, but I believe an updated exe file can be found in the Tomcat SVN Repository).

  5. Install it as Windows service executing "service.bat install [Tomcat instance name]", where [Tomcat instance name] is optional windows service name.

  6. Under certain conditions tomcat is not correctly configure service registry values. It points out itself to 32 bits version of JRE/JDK instead of 64 bits. It can be done explicitly (path to wrong JDK/JRE) or implicitly ("auto" value that imply using of JAVA_HOME or JRE_HOME that point out to 32 bits version). Anyway, it's highly recommented check registry value that define which version of JDK/JRE will be used for tomcat windows service, see key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0[Tomcat instance name]\Parameters\Log\jvm and point it out to correct 64 bits JDK/JRE (e.g. jvm=C:\Program Files\Java\jdk1.5.0_15\jre\bin\server\jvm.dll).