run-app no longer works in IntelliJ after change from Java 1.6 to 1.5

I'm having a problem getting IntelliJ to perform a grails run-app after changing from Java 1.6 to Java 1.5 on Windows XP. I've perfomed all of the required updates to my project including specifying the Java 1.5 JSDK in the project settings, setting my JAVA_HOME and PATH so that the 1.5 JDK is the default when I run `java -version` from the command line. I've run `grails clean` both from the command line and inside IntelliJ and deleted all of my installed plugins (both global and project specific) and none of these seems to work. When I try to build my project I get the following error before during the intial build which is prior to when grails run-app is actually called:

Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:java.lang.UnsupportedClassVersionError: Bad version number in .class fileat java.lang.ClassLoader.defineClass1(Native Method)at java.lang.ClassLoader.defineClass(ClassLoader.java:620)at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)at java.net.URLClassLoader.access$100(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:306)at java.lang.ClassLoader.loadClass(ClassLoader.java:299)at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:637)at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:494)at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:605)at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)at org.codehaus.groovy.control.ResolveVisitor.resolveFromModule(ResolveVisitor.java:549)at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:251)at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:219)at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:203)at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:215)at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:883)at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:649)at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitThrowStatement(ClassCodeExpressionTransformer.java:139)at org.codehaus.groovy.ast.stmt.ThrowStatement.visit(ThrowStatement.java:41)at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:38)at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1020)at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitIfElse(ClassCodeExpressionTransformer.java:84)at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:41)at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:38)at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1020)at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73)at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:80)at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:53)at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:166)at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88)at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:965)at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48)at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:999)at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:141)at org.codehaus.groovy.control.CompilationUnit$5.call(CompilationUnit.java:555)at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:801)at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:466)at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:445)at org.jetbrains.groovy.compiler.rt.MyCompilationUnits.compile(MyCompilationUnits.java:78)at org.jetbrains.groovy.compiler.rt.MyCompilationUnits.compile(MyCompilationUnits.java:72)at org.jetbrains.groovy.compiler.rt.MyGroovyCompiler.compile(MyGroovyCompiler.java:11)at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:189)


One thing that I have noticed is that in IntelliJ, Help -> About still references the version of the Java 1.6 JDK I have installed. I don't see a way to change this in the app so I'm assuming it specified in a BAT file somewhere?

Thanks in advance for any help. This really has me scratching my head.

- Justin
0

Seems that there's something on your module classpath compiled with JDK
1.6. Please try running 'rebuild project' from IDEA.

0

请先登录再写评论。