ID #1055

Tomcat cannot start up: java.lang.UnsupportedClassVersionError: Bad version number in .class file

This error is likely to happen when your version of JDK is lower than required by Tomcat. On Mac computers, even if you have chosen Java 6 for Tomcat 7 via the utility Application/Java Preference, the one used by Tomcat is not 6.

To solve this problem, modify Tomcat/bin/, add this line after the line "" to use Java 6 (change 1.6 to other versions required).

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

Tags: installation, MacOS, tomcat, UnsupportedClassVersionError

Related entries:

You can comment this FAQ