Menu

Getting java.lang.UnsupportedClassVersionError

Anonymous
2016-01-04
2016-01-09
  • Anonymous

    Anonymous - 2016-01-04

    Hi,

    I'm running this on an unencrypted .ab file on OSX and am getting this error:

    Exception in thread "main" java.lang.UnsupportedClassVersionError: org/nick/abe/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:249)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)

    Would appreciate some help. Thank you!

     
  • dragomerlin

    dragomerlin - 2016-01-04

    Run in the terminal
    java -version

    and post the result

     
  • Anonymous

    Anonymous - 2016-01-08

    Thank you for your help. The result is:

    java version "1.6.0_65"
    Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
    Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

     
  • dragomerlin

    dragomerlin - 2016-01-09

    You have an old version of java which is not supported (1.6). Update to 1.7 or 1.8 (calle Java 7 and Java 8). Sorry it's not clearly stated on the README, I'll fix it in the next update.

     

    Last edit: dragomerlin 2016-01-09
  • Anonymous

    Anonymous - 2016-01-09

    Thank you. For anyone with the same problem: I did not realise there were huge issues with Java on OSX, and I had to install jdk-8u65-macosx-x64.dmg in order to have Terminal reflect my Java version as 1.8.0_65-b17.

     
  • dragomerlin

    dragomerlin - 2016-01-09

    I wasn't aware of such issues. What I've heard is that Apple was developing it's own version of java but stopped because they weren't able to keep up. I run OS X under Vmware Workstation and java works fine too. Also Google wants to switch from Oracle's java to OpenJDK so keep an eye out for future updates, in case it's necessary to switch versions.

     

    Last edit: dragomerlin 2016-01-09

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.