Bad version number in .class file

I keep getting this error when trying to launch the newest version of the RubyMine EAP (96.552).  I am trying to do a vanilla install of RubyMine.  Any ideas?

7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671] java.lang.UnsupportedClassVersionError: Bad version number in .class file
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.ClassLoader.defineClass2(Native Method)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.ClassLoader.defineClass(ClassLoader.java:775)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.security.AccessController.doPrivileged(Native Method)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.Class.forName0(Native Method)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at java.lang.Class.forName(Class.java:242)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:55)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at apple.launcher.LaunchRunner.run(LaunchRunner.java:111)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
7/8/10 9:36:54 AM [0x0-0x74074].com.jetbrains.rubymine[8671]  at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
7/8/10 9:36:54 AM com.apple.launchd[239] ([0x0-0x74074].com.jetbrains.rubymine[8671]) Exited with exit code: 1
7/8/10 9:36:54 AM com.apple.launchd[239] ([0x0-0x74074].com.jetbrains.rubymine[8671]) Exited with exit code: 1

5 comments
Comment actions Permalink

Hello Jeff,

RubyMine 2.5 requires JDK 6.

I keep getting this error when trying to launch the newest version of
the RubyMine EAP (96.552).  I am trying to do a vanilla install of
RubyMine.  Any ideas?

7/8/10 9:36:54 AM .com.jetbrains.rubymine[8671]
java.lang.UnsupportedClassVersionError: Bad version number in .class
file 7/8/10 9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.lang.ClassLoader.defineClass2(Native Method) 7/8/10 9:36:54 AM
.com.jetbrains.rubymine[8671]  at
java.lang.ClassLoader.defineClass(ClassLoader.java:775) 7/8/10 9:36:54
AM .com.jetbrains.rubymine[8671]  at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160
) 7/8/10 9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.net.URLClassLoader.defineClass(URLClassLoader.java:254) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.net.URLClassLoader.access$100(URLClassLoader.java:56) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.net.URLClassLoader$1.run(URLClassLoader.java:195) 7/8/10 9:36:54
AM .com.jetbrains.rubymine[8671]  at
java.security.AccessController.doPrivileged(Native Method) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.net.URLClassLoader.findClass(URLClassLoader.java:188) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.lang.ClassLoader.loadClass(ClassLoader.java:317) 7/8/10 9:36:54
AM .com.jetbrains.rubymine[8671]  at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.lang.ClassLoader.loadClass(ClassLoader.java:252) 7/8/10 9:36:54
AM .com.jetbrains.rubymine[8671]  at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
java.lang.Class.forName0(Native Method) 7/8/10 9:36:54 AM
.com.jetbrains.rubymine[8671]  at
java.lang.Class.forName(Class.java:242) 7/8/10 9:36:54 AM
.com.jetbrains.rubymine[8671]  at
apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:55)
7/8/10 9:36:54 AM .com.jetbrains.rubymine[8671]  at
apple.launcher.LaunchRunner.run(LaunchRunner.java:111) 7/8/10 9:36:54
AM .com.jetbrains.rubymine[8671]  at
apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50) 7/8/10
9:36:54 AM .com.jetbrains.rubymine[8671]  at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.
java:52) 7/8/10 9:36:54 AM com.apple.launchd[239]
(.com.jetbrains.rubymine[8671]) Exited with exit code: 1
7/8/10 9:36:54 AM com.apple.launchd[239]
(.com.jetbrains.rubymine[8671]) Exited with exit code: 1

---
Original message URL:
http://devnet.jetbrains.net/message/5267296#5267296

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


0
Comment actions Permalink

Did that change recently?  I had a previous version of RubyMine EAP running on this machine.

0
Comment actions Permalink

Hello Jeff,

Yes, this changed because we've switched to a newer version of the IntelliJ
Platform.

Did that change recently?  I had a previous version of RubyMine EAP
running on this machine.


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


0
Comment actions Permalink

I appear to be getting the same error message with the latest EAP, but I am pretty sure that I am running the latest Java 6 release for OSX (10.5.8).

 

501 : ~ $ /Applications/RubyMine-96.552.app/Contents/MacOS/rubymine
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
     at java.lang.ClassLoader.defineClass2(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:774)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
     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:316)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:242)
     at apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:55)
     at apple.launcher.LaunchRunner.run(LaunchRunner.java:111)
     at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
     at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

502 : ~ $ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-226)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-92, mixed mode)

503 : ~ $ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
total 56
lrwxr-xr-x  1 root  wheel    5 Jul 12 04:33 1.3 -> 1.3.1
drwxr-xr-x  3 root  wheel  102 Sep 29  2007 1.3.1
lrwxr-xr-x  1 root  wheel    5 Jul 12 04:33 1.4 -> 1.4.2
lrwxr-xr-x  1 root  wheel    3 Nov 14  2007 1.4.1 -> 1.4
drwxr-xr-x  8 root  wheel  272 Nov  3  2006 1.4.2
lrwxr-xr-x  1 root  wheel    5 Jul 12 04:33 1.5 -> 1.5.0
drwxr-xr-x  8 root  wheel  272 Nov  3  2006 1.5.0
lrwxr-xr-x  1 root  wheel    5 Jul 12 04:33 1.6 -> 1.6.0
drwxr-xr-x  8 root  wheel  272 Apr 11  2009 1.6.0
drwxr-xr-x  8 root  wheel  272 Jul 12 04:34 A
lrwxr-xr-x  1 root  wheel    1 Jul 12 04:34 Current -> A
lrwxr-xr-x  1 root  wheel    5 Jul 12 04:49 CurrentJDK -> ./1.6

What other environment settings am I overlooking?

0
Comment actions Permalink

I ended up editing the Info.plist file in /Applications/RubyMine-96.552.app/Contents and changing the required JVM from 1.5+ to 1.6+.

From

      <key>JVMVersion</key>
       <string>1.5+</string>

to

      <key>JVMVersion</key>
      <string>1.6+</string>


That allowed me to launch Rubymine.

0

Please sign in to leave a comment.