tags:

views:

1671

answers:

4

Hi,

We are getting this error on starting tomcat (both as a service and via command line):

This release of Apache Tomcat was packaged to run on J2SE 5.0
or later. It can be run on earlier JVMs by downloading and
installing a compatibility package from the Apache Tomcat
binary download page.

We have the version with a tomcat5.exe and tomcat5w.exe - no bat files :(

The path only has jdk5 on it:

Path=f:\Program Files\Java\jdk1.5.0_06\bin;C:\WINDOWS\System32

We are using Tomcat5.5, with jdk 1.5.0_06 installed on the same machine.

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

The JAVA_HOME also points to the same version:

F:\Development\Program Files\Apache Software Foundation\Tomcat 5.5\bin>set j
JAVA_HOME=f:\Program Files\Java\jdk1.5.0_06

Any tips on where I am going wrong?

Thanks Chris

+1  A: 

You can configure a different version of Java in the start.bat file. The same goes for the service (but in a different place).

I suggest to add an echo %JAVA_HOME% (if you use the start.bat) to see what is really happening.

If you use the service, open the properties for the service (use the icon tomcat puts in the systray). On the tab "Java", you'll find the JVM which the service uses.

Aaron Digulla
We only have the .exe version - no bat files, strangely - maybe I should re-download it.
Chris Kimpton
A: 

I hope I'm not over simplifying, but did you check your PATH?


EDIT: just out of curiosity, try changing your PATH and your JAVA_HOME to .../jdk1.5.0_06/jre/bin

Yuval A
Thanks, double checked it - we did have the same jdk on there 3 times - but even changing that still gives the same error.
Chris Kimpton
Gave that a go, but no joy either.. will grab bat files and try that now.
Chris Kimpton
A: 

Didn't tried that myself, but I read somewhere (sorry don't ´know where), that sometimes reinstallation of tomcat is necessary after installing java 5. So, if you installed tomcat5 first and java5 later, maybe that's your problem.

Kai
+1  A: 

You only have the exe version and not the bat files, because you've downloaded the Windows Installer and not the zip file. The bat files are only included in the zip file. You can download the zip and copy the bat files to the bin directory. No need to uninstall.

I bet that you have a PATH problem. Check if there is an old version of Java in a system directory. Also, make sure that you modify the PATH system wide and not per command line session.

kgiannakakis
Doh - don't you just love inheriting stuff - the its a JRE installed into a directory named as if it was the JDK :(
Chris Kimpton
By the way, recent versions of Tomcat don't require a JDK. A JRE is enough.
kgiannakakis