Reputation: 9720
I installed Java 7 on my Mac, compiled a web-app, and now I am trying to run it on Tomcat. However, I get the nasty Unsupported major.minor version 51.0
error. Googling showed that it is because Tomcat is using Java 6 to run the app, which is compiled for Java 7.
So I tried setting the path to the Java 7 jre in my "catalina.sh" script, but it didn't help. Moreover, "java -version" returns the correct java version.
dtv$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
How can I fix this?
Upvotes: 0
Views: 416
Reputation: 308938
Try setting JAVA_HOME environment variable to point to your JDK 7. Catalina expects to find Java there. See if that tells it how to get JDK 7.
Upvotes: 2