Installing Tomcat 6 on Vista x64
Installing a Apache Tomcat 6 on Vista x64 is not a straightforward task especially if you use 64-bit Java. This was the most painful experience I have had so far on Vista.
Below is a list of steps to help anyone who runs into these problems. I was installing Tomcat 6.0.20 to be running using JDK 188.8.131.52.
0. Prerequisites. You installed 64-bit JDK/JRE for Windows from Sun (http://java.sun.com)
1. Download apache-tomcat-6.0.20.zip from http://tomcat.apache.org/download-60.cgi. Do not use the Windows Service Installer.
2. Unzip it into your installation directory.
3. Having set JAVA_HOME system variable does not help. You should also define JRE_HOME pointing to the JRE. Otherwise you will get the following when trying to run startup.bat:
The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE
4. Make sure you can start and stop the server using startup.bat and shutdown.bat.
5. You will need to get the 64-bit version of tomcat6.exe. It is in the Subversion repository at http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_20/res/procrun/. But here is another obstacle. Apache disabled the ability in the ViewVC configuration to download binary files from the repository. So you need to use another location: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/. Please note, that the SVN repository has both tomcat6.exe and tomcat6w.exe for each architecture (ia64 and amd64), while the location to download only has tomcat6.exe. The choice of architecture is also confusing (Intel Itanium or AMD). So what am I supposed to download if I have Intel Core i7 (Nehalem/Bloomfield)? AMD64. Also, there is a ‘FIXED’ bug with a request to make this less painful.
6. Copy tomcat6.exe in the installation directory to something like tomcat6.32.exe. Overwrite tomcat6.exe in the installation directory with the 64-bit version. If you do not do this step you will get this message in the System event log (after you successfully install the service and try to start it):
The Apache Tomcat Tomcat6 service terminated with service-specific error 0 (0x0).
7. Install the service by running the following command from the command prompt with administrative privileges (see the previous post how to do this):
service.bat install Tomcat6
You should be running it in the installation directory. Tomcat6 is the service name, spaces in the service name do not seem to be supported. Installation will fail if you have the User Access Control enabled.
8. Now you should be able to start the “Apache Tomcat Tomcat6″ Windows service.
1. Do not forget to check where you log files are stored. If the UAC is enabled, you may not even know that your logs are not stored.
2. JConsole will not detect your Tomcat instance if you are running the server as a Windows service.
3. (Not related to Vista, but still worth to mention). There is no admin application in Tomcat 6.
I hope experience with Tomcat 6.0.21 will be better.
Update (Jan 24, 2010): This problems should be over with the release of Tomcat 6.0.24.
Update (Mar 12, 2010): This problems is over with the release of Tomcat 6.0.26.