How to find out if Tomcat is 32 bit or 64 bit on window server?

41,807

Solution 1

As Pierre mentions there is only one installer available from apache.org that will work on both 32bits and 64bits in the Tomcat official site. This is because Tomcat itself is a java application and it is platform independent (the Java VM is what will be 32bits or 64bits). In any case, it doesn't matter if you have installed Java in the 32bits or 64bits version however depending on the Java version you have installed it will install the Windows service wrapper for 32 or 64 bits.

In a 32 bits system you can only install the 32 bits Java version. On a 64 bits system you can install either a Java 32 bits version or a Java 64 bits version. If you installed a 64 bits version the default installation directory for the Tomcat will be installed as a 64 bits application. This mean that installer will use the "Program Files" folder as the default installation directory and the entry for the Tomcat service in the windows registry will be placed in "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation". However if you use a 32 bits version of Java Tomcat will be installed as a 32 bits application. The default installation directory for the installer will be in "Program Files (x86)" and the entry for the service in the windows registry will be placed in "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432\Apache Software Foundation". This is the default for 32 bits applications in a 64 bits Windows system.

Together with the Windows service wrapper there is another component that it is different for a 32bits and 64bits version of Tomcat. It is the APR/native library for Windows but this is not included in the installer. In the Tomcat website you can also find other Tomcat distributions that include it and these distributions do depend on the JVM version that you are using (32 or 64 bits ).

Solution 2

For Windows, there is only one installer capable of installing both 32 and 64 bits version.

http://tomcat.apache.org/download-60.cgi#6.0.32

You can try to install it, and run the ./bin/version.[bat|sh] script.

Look at the "Architecture" field on the output.

Solution 3

Easy, start tomcat, and go to task manager. If it's 32-bit it will show *32 suffixed to the process name. Make sure you look at tomcatx.exe and not tomcatxw.exe process. I think on some versions the java process will show up instead of tomcat.

Solution 4

On my Windows 7 64 bit machine: If java is 32 bits, Tomcat 7 is installed to the Program files (x86) directory by default. But the registry keys are put into BOTH places:

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation
and
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation

This means that the post above is wrong, at least on Windows 7 64 bit.

Tomcat 7 has no bitness, really: It's a Java app. Its bitness depends on which bitness of Java is installed.

It is possible to have both 64 and 32 bit versions of Java installed. If Tomcat 7 installer finds Java 7 32 bit installed (only), then it will install tomcat 7 into the Program files (x86) directory. But the Tomcat 7 installer will pick the 64 bit version Java, and install itself into the Program Files folder.

But you can't assume that Tomcat 7 is using 64 bit Java in this case, because the user could have added 64 bit Java after installing tomcat 7, and tomcat 7 doesn't know to change its 'bitness' from 32 to 64 when this happens.

So far I have been unable to find a reliable method of determining which JRE Tomcat is using. Using folder names like Program files (x86) doesn't mean anything, because the user can change this location to whatever they like.

As for the last answer before this one, above, Tomcat 7 doesn't appear to have the version.bat or version.sh file that is described, so that no longer is accurate, either, AFIK.

Share:
41,807
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    We have an installer which install Tomcat. How do I know if it's 32bit version of Tomcat or 64bit version?

  • Edd
    Edd over 10 years
    There are clearly different zip files available for 64 and 32 bit windows available for download. tomcat.apache.org/download-70.cgi
  • rd22
    rd22 over 8 years
    This is not valid now, there are multiple versions of [Tomcat ](tomcat.apache.org/download-70.cgi).
  • slim
    slim about 4 years
    If you check the Tomcat service's process in task manager it will say 32 bit service if the 32 bit version was installed.