views:

665

answers:

1

Hoping someone can help.

The rub: I can't get Tomcat 5.5 to start as a windows service on 64-bit windows using a 32-bit JDK.

the details: I've been running Tomcat 5.5 on Windows Server 2008 (x64) as a service for some time using a 64-bit JDK.

I'm being forced to install a 32-bit JDK on this 64-bit machine so I can make use of the Java JAI libraries (no 64-bit JAI version). I have to run Tomcat using this 32-bit JDK.

I can run Tomcat using the 32-bit JDK if I start it using /bin/startup.bat

Problem is, it will not start as a windows service. I'm using the Tomcat bundled procrun executables. Has anyone had success starting Tomcat as a service using a 32-bit JDK on a 64-bit machine?

Thanks for your expertise.

A: 

To run with a 64-bit JDK, you need to use tomcat.exe and tomcatw.exe that are compiled 64-bit. To run with a 32-bit JDK, you need the .exes that are compiled 32-bit.

It is likely that the install package you got for Tomcat contained 64-bit executables. Go to the download page (http://tomcat.apache.org/download-60.cgi), download the 32-bit version and you should be fine.

This question has more info on running Tomcat with 64-bit. http://stackoverflow.com/questions/211446/how-to-run-tomcat-6-on-winxp-64-bit

Chris Dail
I don't think this answers his question. He needs to run Tomcat on a 32bit JDK on 64bit Windows.
Stephen C
Thanks for the answer. Although not correct, it actually contains a key element. I found the answer the problem. To get it to run with the 32bit JDK, you have to use the procrun executables compiled for the 32-bit JDK (this is the default). To get it to run with the 64-bit JDK, I replaced the 32-bit tomcat.exe with the 64-bit version (also included, but in a subfolder).It turns out the bit depth of the OS doesn't matter here. Just match the bit depth of the tomcat.exe with the JDK.
Erik