64Bit Windows Tomcat Service

If you have a 64Bit windows install you will soon realize that you can't install Tomcat as a service using the Windows Service Installer located on the Tomcat website.

Well you "can" run the installer, and it will even add the service but you won't be able to start it up. Why? because the executable that is included in the install is 32 bit. So don't bother trying ok! Download the zip file instead and extract the contents.

64 Bit?

You can replace the tomcat6.exe and tomcat6w.exe from Apache subversion.

Once you have downloaded the two 64bit executables back up the two in the /bin directory and copy them there. You will need to install the service using the service installer. To do this execute the following command from the command prompt.
c:\tomcat\bin\>service install tomcat6 Installing the service 'tomcat6' ... Using CATALINA_HOME: C:\srv\tomcat Using CATALINA_BASE: C:\srv\tomcat Using JAVA_HOME: C:\java Using JVM: C:\java\jre\bin\server\jv The service 'tomcat6' has been installed.
Opening up the windows services you should see a service called "Apache Tomcat tomcat6" set to manual start. You should now be able to start up Tomcat without issue.

I have successfully installed 64Bit Tomcat on several 64Bit Windows Server 2008 using the above procedure. I am unaware of any issues at this time.

Happy Coding...

20 Comments to "64Bit Windows Tomcat Service"- Add Yours
Matthew Sgarlata's Gravatar You can actually download the files here

# Posted By Matthew Sgarlata | 10/16/09 4:31 PM
Patrick's Gravatar Thanks Gary. It works just fine based on your documentation. There are a lot of incorrect posts out there when it comes to running Tomcat 6.x on x64 (Window Server 2008 Ent R2 in my case). Would recommend to pick from latest tag (here 20 as of December 2009 - http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/T...)
# Posted By Patrick | 12/17/09 9:25 PM
Sagar's Gravatar Hi,
Can you tell me how to Install Tomcat 6 on AMD 64 bit Windows Server 2003 using 32 bit JVM. I have a requirement that won't allow me to change my JVM to 64 bit (.dll problem).

Is there any solution to this ?
# Posted By Sagar | 2/2/10 2:02 AM
Gary Gilbert's Gravatar Tomcat 6.0.24 was recently released with a new installer that supports both 32 and 64 bit service installs.

if you have 64 bit windows then download the new 64 bit Java JDK and during the install you will be prompted to either choose the 32 or 64 bit JRE.
# Posted By Gary Gilbert | 2/2/10 2:16 AM
Louie's Gravatar I have Windows Server 2008 Std Edition 64-bit running 64-bit Java - jdk1.6.0_16.
I have tried installing the new 6.0.24 using both the .exe installer and the .zip archive.
I can not install tomcat as service using the service.bat file. I keep getting the
following error: Failed installing 'Tomcat6' service.

Anyone know of a solution out there?
# Posted By Louie | 2/10/10 11:54 AM
Gary Gilbert's Gravatar Just curious, did you have the older 64 bit version of tomcat installed? If so you may want to completely uninstall first, make sure that the old 64bit version is no longer in your services panel.

you should be able to remove it with c:\tomcat6\bin\tomcat6 //DS// 'tomcat6' where tomcat6 is the service name.

once you have removed the service then try again. If it still doesnt work do the old restart trick and try again
# Posted By Gary Gilbert | 2/11/10 2:09 AM
Louie's Gravatar Yes, I did have an older version installed. However, I did take the steps
to remove the service and delete the apllicable registry keys.

Thanks for the follow-up.
# Posted By Louie | 2/11/10 9:15 AM
Gary Gilbert's Gravatar and it still won't install? That is bizarre!

does tomcat work without installing it as a service? simply using the start.bat file?
# Posted By Gary Gilbert | 2/11/10 9:18 AM
Louie's Gravatar It required a restart to get to install.
Gotta love Windoze
# Posted By Louie | 2/11/10 9:30 AM
Gary Gilbert's Gravatar Yep one of the machines I recently upgraded I had to restart, believe it was windows 2008 too, Windows XP I didn't need to restart.
# Posted By Gary Gilbert | 2/12/10 1:48 AM
Harry's Gravatar Thanks Gary... You Rock!!
It ws a gr888 help...
# Posted By Harry | 2/17/10 5:09 AM
Nkosi's Gravatar A *headslapping* gotcha to look out for is the behaviour of Windows 2008 R2 user access control.

I have spent a long time today trying to get Tomcat6 running on port 81 but editing the c:\Program Files\Tomcat6\conf\server.xml as me (despite being part of the administrators group) resulted in no change.

Turns out when I opened the server.xml, Windows, in its wisdom, opened the file from my VirtualStore. (C:\Users\{user here}\AppData\Local\VirtualStore\Program Files\Tomcat6\conf).

Make sure you run your text editor as Administrator and then edit your conf files.
# Posted By Nkosi | 6/8/10 5:34 PM
Jeff's Gravatar With Windows Server 2008 R2, the .30 installer does install the 64 bit
version, but the default security settings in Windows won't let the
service start properly. You need to navigate to the folder
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
and then enable "Run as administrator" for tomcat6.exe and tomcat6w.exe
Then you can start the service normally
# Posted By Jeff | 1/25/11 12:24 PM
Robert Kosednar's Gravatar Nice Job... Worked fine for SBS 2011. Racked my brain on this for hours.
You be the man!


Verizon iPhone Exchange Expert
# Posted By Robert Kosednar | 1/29/11 2:02 PM
AP VENKATESH's Gravatar Install Java 1.5 for tomcat 6.0.20 in root directory dont install in program files. Will work fine in 32 bit and 64 bit. Try 1.6 Java same way with Apache 7.0
# Posted By AP VENKATESH | 2/18/11 1:26 AM
d3d3's Gravatar Thank you so much Jeff,
Worked for Tomcat 7 x64 on Windows Server 2008 R2
# Posted By d3d3 | 4/16/11 3:52 AM
shylu's Gravatar hi,
i installed tomcat-7.0.22,when i start the startup.bat then the command prompt appears and disappears fastly....even i started by running as administrator, but the same thing happened...and i am not able to start the tomcat server...what will be the problem behind it and how should i fix this problem..........plz specify me a best solution.....thanks in advance...
# Posted By shylu | 10/29/11 10:57 PM
Nkosi's Gravatar @shylu, it sounds like you may not have a JRE installed or, if you do, you don't have JAVA_HOME or PATH set in your Environment Variables.

You can try open the startup.bat in a text editor and add 'pause' at the end of the file, that should keep the cmd window open - that may help you see what the problem is.
# Posted By Nkosi | 10/30/11 12:25 AM
Leela Vinodh's Gravatar Thank you very much I was struggling for last one week. Search in several sites but nothing worked. Finally your solution helped me. Thanks a lot.
# Posted By Leela Vinodh | 11/21/11 4:26 AM
Nishit's Gravatar Hello , Iwas trying to install tomcat 7 (apache-tomcat-7.0.23.exe)on Windows Xp service pack 3 my system is on company's network i am continually facing an error
::::::::failed to install tomcat 7 service Check your setting and permission Ignore and continue anyway
can you suggest me what is the problem and possible solution for that!!!!

# Posted By Nishit | 12/24/11 9:50 AM

Powered By Railo


Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.


adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript jquery max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.


An Architect's View
Rey Bango

Wish List

My Amazon.com Wish List