4 Replies Latest reply: Sep 9, 2009 4:15 PM by 843802 RSS

    Java Plugin not running on Mac OS X browsers

    843802
      Hi

      I have created an applet that runs on any browser on Windows, and runs only as an application on Mac OS X. But when I try to run it as an applet on Mac OS X, it does not run. I have installed the latest Java from apple, and changed the preferences to run 1.6 Java on the browsers.

      I get the following error:

      MRJ Plugin for Mac OS X v1.0.1
      [starting up Java Applet Security @ Tue Feb 03 11:34:26 EST 2009]
      basic: Referencing classloader: sun.plugin.ClassLoaderInfo@c7980c, refcount=1
      basic: Added progress listener: sun.plugin.util.GrayBoxPainter@36a1a1
      basic: Loading applet/u2026
      basic: Initializing applet/u2026
      basic: Referencing classloader: sun.plugin.ClassLoaderInfo@c7980c, refcount=2
      basic: Releasing classloader: sun.plugin.ClassLoaderInfo@c7980c, refcount=1
      basic: httpCompression = true
      network: Connecting http://192.168.2.50:8080/MCA_V3_1/Clientlib/lms-common.jar with proxy=DIRECT
      basic: Downloading http://192.168.2.50:8080/MCA_V3_1/Clientlib/lms-common.jar to cache
      basic: encoding = null for http://192.168.2.50:8080/MCA_V3_1/Clientlib/lms-common.jar
      basic: Cached file name: lms-common.jar-277a142b-79528a22.zip
      security: Loading certificates from Deployment session certificate store
      security: Loaded certificates from Deployment session certificate store
      security: Checking if certificate is in Deployment session certificate store
      security: User has granted the priviledges to the code for this session only
      security: Adding certificate in Deployment session certificate store
      security: Added certificate in Deployment session certificate store
      security: Saving certificates in Deployment session certificate store
      security: Saved certificates in Deployment session certificate store
      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 sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:147)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
           at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:605)
           at sun.applet.AppletPanel.createApplet(AppletPanel.java:723)
           at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1864)
           at jep.AppletFramePanel.createApplet(AppletFramePanel.java:189)
           at sun.applet.AppletPanel.runLoader(AppletPanel.java:652)
           at sun.applet.AppletPanel.run(AppletPanel.java:326)
           at jep.AppletFramePanel.run(AppletFramePanel.java:176)
           at java.lang.Thread.run(Thread.java:613)
      basic: Exception: java.lang.UnsupportedClassVersionError: Bad version number in .class file
      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 sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:147)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
           at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:605)
           at sun.applet.AppletPanel.createApplet(AppletPanel.java:723)
           at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1864)
           at jep.AppletFramePanel.createApplet(AppletFramePanel.java:189)
           at sun.applet.AppletPanel.runLoader(AppletPanel.java:652)
           at sun.applet.AppletPanel.run(AppletPanel.java:326)
           at jep.AppletFramePanel.run(AppletFramePanel.java:176)
           at java.lang.Thread.run(Thread.java:613)


      Any ideas how I can fix this?

      Thanks,

      GK
        • 1. Re: Java Plugin not running on Mac OS X browsers
          794256
          basic: Exception: java.lang.UnsupportedClassVersionError: Bad version number in .class file
          Are you using Safari?

          Edited by: toddburch on Feb 18, 2009 7:04 AM
          • 2. Re: Java Plugin not running on Mac OS X browsers
            843802
            I have tried with Safari and Firefox.
            • 3. Re: Java Plugin not running on Mac OS X browsers
              843802
              After doing some research, I still cannot fix this problem.

              I Build the applet on Mac OS X using netbeans 6.7.1, with Java 6 (64-bit, there is no Java 6 - 32 Bit on Mac OS X)
              When I run the applet on safari or firefox on Mac OS X, The console says running on Java 5. (Although the properties have been changed in Mac OS X /Utilities/Java Preferences)

              I have been struggling with no end in site, for this issue.

              I was able to get the Applet working by reverting to Java 5 and using the Java Swing jar from Java.net. But I still want to be able to just use Java 6 in Mac OS X. (I can't use the GUI Builder in netbeans with the separate swing jar).

              ANY HELP please.
              • 4. Re: Java Plugin not running on Mac OS X browsers
                843802
                My Snow Leopard finally arrived today, and you'll be happy to know that there is now a 32bit Java 6 under OSX, you can select it from Java Prefferences App. Rumour has it there is also plugin2 support, but so far I haven't found it, hence my visit here today. But I spotted your post and thought it might be of some help to you to know there is a 32 bit option now and browsers seem to also pickup java6 now. in fact I saw you can select if you want browsers to use 64 or 32 bit for applets, and a separate setting for webstart!