Hi all,
I've updated
Tomcat to version 7, the JDK to version 7, and the run-time to version 7.
---------------------
Yet, when I run the application's
Servlet (
http://localhost:8080/TestServlet/MyServlet), I get this error:
type Exception report
message net/test/servlets/MyServlet : Unsupported major.minor version 51.0 (unable to load class net.test.servlets.MyServlet)
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.UnsupportedClassVersionError: net/test/servlets/MyServlet : Unsupported major.minor version 51.0
-------
But, doing a javap -verbose gives me (for this Servlet):
SourceFile: "MyServlet.java"
minor version: 0
major version: 51
***** and, at the command line, "java -version" gives me:
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)
-------------------
If I run the project directly from the
IDE and it brings up the browser, then it works.
-------------------
(Tomcat log has no reported problems.)
I noticed that in "/System/Library/Frameworks/JavaVM.framework", under CurrentVersion it still says 1.6 so that could be the problem, but I don't know how to change that.
I was thinking that installing the latest Java 7 to
"/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk" would update the current version.
How do you update the current version "setting" on a Mac in /System/Library/Frameworks/JavaVM.framework (
if you need to, that is)? Going into System Preferences already says it's 1.7.0.
--------------------
Within the IDE (Intellij IDEA 12) everything is set to Java 7 so I'm really at wits end trying to nail this one down. If I change the Java version to Java 6, then the Servlet loads/works.
What else is there to look at?
Look forward to any suggestions.
Thanks in advance.
- m