Results 1 to 2 of 2
  1. #1
    newbie_jar is offline Member
    Join Date
    Nov 2011
    Rep Power

    Default applet loading errors strange?!

    hey guis,
    i'm kinda new to java, but i'm a great learner :) i hope you can help me with this strange applet error..
    short description, using xp sp2 installed on my computer and jdk1.6 i have created a jar file for my webiste.
    (i also have installed jdk7 but i use the compiler from jdk6/bin/ folder)
    i have compiled the jar file using the following commands:
    jar cvf myfile.jar myfile.class
    keytool -genkey -alias mykey -dname "cn=AnthonyWebsite, ou=JavaSoft, o=Sun Java, c=US"
    keytool -selfcert -alias mykey -validity 3650
    jarsigner myfile.jar mykey
    jarsigner -verify -verbose -certs myfile.jar

    everything was ok.

    i've googled a little for a java script applet loader and found something. now my applet loader looks like this:

    <SCRIPT LANGUAGE="JavaScript"><!--
    if (_ie == true) document.writeln('<OBJECT \
    classid="clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA" \
    width="150" height="150" align="baseline" \
    codebase=",4,2,0"> \
    <NOEMBED><XMP> \');
    else if (_ns == true && _ns6 == false) document.writeln('<EMBED \
    type="application/x-java-applet;jpi-version=1.4.2" \
    CODE = "myfile.class" \
    ARCHIVE = "myfile.jar" \
    WIDTH = "150" \
    HEIGHT = "150" \
    scriptable="false" \
    pluginspage="><NOEMBED><XMP> \');

    on all of my browsers the application work fine, i have no errors nothing. Also checked the java error console and nothing in there...
    now, the problem is with other users that visit the website, many of then can't see the applet, or get error instead of loading applet...

    here is a list of errors they get in java console:

    Ignored exception: java.lang.NullPointerException
    java.lang.UnsupportedClassVersionError: myfile : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.defineClassH elper(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.findClassHel per(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)

    i am sure it's a simple bug, but i can;t figure which is it...

    Thank you!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: applet loading errors strange?!

    Unsupported major.minor version 51.0
    What version of the compiler and JREs are involved?
    For example are you using java 1.7 and your friends are using 1.6?

Similar Threads

  1. Java Applet Strange Image Loading Problem
    By 1yuchen in forum Java Applets
    Replies: 36
    Last Post: 01-06-2012, 03:06 AM
  2. Replies: 12
    Last Post: 07-25-2011, 04:25 PM
  3. Loading Applet in a web browser
    By techbossmb in forum Java Applets
    Replies: 2
    Last Post: 09-30-2009, 02:57 AM
  4. Why is one applet loading but the other isnít?
    By spmchugh82 in forum Java Applets
    Replies: 1
    Last Post: 01-26-2009, 04:39 PM
  5. Java applet strange painting behaviour
    By sirdori in forum New To Java
    Replies: 1
    Last Post: 01-07-2009, 02:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts