Form Snapshot - UnsupportedClassVersionError

I tried to use the form snaphot today and got this error on the command line

java.lang.UnsupportedClassVersionError: Bad version number in .class file
at 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Disconnected from the target VM, address: '127.0.0.1:49343', transport: 'socket'
Exception in thread "main"
Process finished with exit code 1


After some confusion and digging, it turns out that the issue was that the IDE was running from JDK1.6 and the project was set to JDK1.5
Is it possible for IDEA to trap this error and report the cause in a dialog instead?

0
2 comments

Hello opticyclic,

I tried to use the form snaphot today and got this error on the
command line

java.lang.UnsupportedClassVersionError: Bad version number in
> .class file
> at 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> Disconnected from the target VM, address: '127.0.0.1:49343',
> transport: 'socket'
> Exception in thread "main"
> Process finished with exit code 1

After some confusion and digging, it turns out that the issue was that
the IDE was running from JDK1.6 and the project was set to JDK1.5

Is it possible for IDEA to trap this error and report the cause in a
dialog instead?


Yes, it's possible. Please file a JIRA issue.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.