所以我得到以下異常: 我知道major.minor version
異常是在用舊jdk編譯時運行的,但是我只是在執行GWT編譯。任何人都可以提供一些線索在此:在eclipse中進行GWT編譯時不支持的main.minor版本
Compiling module com.domkee.entities.Entities
[ERROR] Unexpected internal compiler error
java.lang.UnsupportedClassVersionError: com/domkee/entities/client/annontations/Table : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.google.gwt.dev.javac.TypeOracleMediator.getAnnotationClass(TypeOracleMediator.java:575)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:643)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:663)
at com.google.gwt.dev.javac.TypeOracleMediator.resolveClass(TypeOracleMediator.java:809)
at com.google.gwt.dev.javac.TypeOracleMediator.addNewTypes(TypeOracleMediator.java:439)
at com.google.gwt.dev.javac.TypeOracleMediatorFromSource.addNewUnits(TypeOracleMediatorFromSource.java:52)
at com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:164)
at com.google.gwt.dev.javac.CompilationState.<init>(CompilationState.java:82)
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:450)
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:370)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:360)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:252)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
我看到如果您的環境變量JAVA_HOME設置與您的ECLIPSE defalt JRE設置設置爲不同,則會發生此錯誤。 – SSR