Menu

Java version won't run on Mac

Help
2008-10-24
2013-04-26
  • Nobody/Anonymous

    I'm trying to run the Java version on a Mac running OS X 10.5.5 with a fully updated version of Java. The .jar will not run, even from the terminal. It gives this error message:

    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
        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: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)

    Any ideas?

     
    • M Hammel

      M Hammel - 2008-10-25

      What version of Java do you have.  The web-site says GTD-Free requires 1.6, and it looks like you're running a lower version than that.

       
    • Nobody/Anonymous

      Hi,
      Can the next version be compiled with Java 1.5?  Or at the very least can the sources be available for download so I can recompile them myself?  I'm not sure what the advantage of using Java 1.6 is.

      Karl

       
    • Ike

      Ike - 2008-10-27

      You should install and use Java version 1.6.

       
    • Wes Garrison

      Wes Garrison - 2008-10-28

      Had this issue, too.

      > java -version
      java version "1.5.0_13"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)

      Installed update (from Software Update)
      Java for Mac OS X 10.5 Update 2
      "Java for Mac OS X 10.5 Update 2 delivers improved reliability and compatibility for Java SE 6, J2SE 5.0 and J2SE 1.4.2 on Mac OS X 10.5.4 and later. This release updates Java SE 6 to version 1.6.0_07, J2SE 5.0 to version 1.5.0_16, and J2SE 1.4.2 to 1.4.2_18.

      For more details on this update, please visit this website: http://support.apple.com/kb/HT2733
      "

      Then, from the article linked above, you need to update the symlink to the newest java version:
      ~> sudo rm /usr/bin/java
      ~> sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java /usr/bin/java

      > java -version
      java version "1.6.0_07"
      Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)

      Double-clicking the .jar works now.

       
    • Nobody/Anonymous

      The easiest way to do this is to do a spotloght search for "Java Preferences" (or navigate to Applications, Utilities, Java folder).

      Under the general tab, drag around the Java Application versions so v1.6 is at the top.

      Double-click the JAR to launch.

      I suppose I was a bit worried that the 64bit version of Java won't work on my Macbook Pro but it does.

      Thanks for the nice work!
      Karl

       
    • Nobody/Anonymous

      Hi,

      great application!

      But I also have the problem with the JAVA 1.6 Issue at home.
      Problem is, that Java 1.6 is not for PowerPC Macs and early Intel Macs (32bit).
      And I don't think Apple will change this.

      So, if there is a way of going to Java 1.5 it would be very nice!

      Thanks
      Markus

       
    • Nobody/Anonymous

      Java 1.6 is not available for 32bit Intel Macs. Would have really liked to use this app. Shame.

       
  • Peteredhair

    Peteredhair - 2012-07-07

    I'm running GTD-Free on my iMac with Lion.

    Not a Mac looks app but works fine.

     

Log in to post a comment.