|Java7 class files in spite of ExecEnv=1.6 [message #1060749]
||Tue, 28 May 2013 10:59
| Caspar D.
Registered: July 2009
I have an app composed of a set of OSGi bundles, all of which specify
But when I start up the application I get
java.lang.UnsupportedClassVersionError: some/class/of/Mine : Unsupported major.minor version 51.0
Now version 51.0 is a Java 7 class file. So a Java 7 file was generated in spite of the RequiredExecutionEnv setting in the manifests. How is this possible?
I've noticed I can override this by setting Preferences>Java>Compiler>Compiler Compliance Level to 1.6, but I don't think that should be necessary. As per http://wiki.eclipse.org/Execution_Environments, the specified environment should be heeded at compile time also, not just at runtime.
(BTW, yes I have a JDK6 installed and configured under Preferences>Java>Installed JREs>Execution Environments>JavaSE-1.6. Not that it should matter. Even if I didn't have a JDK6 at all, I think the RequiredExecEnv in the manifests should be heeded.)
[Updated on: Tue, 28 May 2013 11:01]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.09453 seconds