Results 1 to 2 of 2
Thread: applet loading errors strange?!
- 11-08-2011, 04:03 PM #1
Member
- Join Date
- Nov 2011
- Posts
- 30
- Rep Power
- 0
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:
javac myfile.java
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="http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,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="http://java.sun.com/products/plugin/index.html#download><NOEMBED><XMP> \');
//--></SCRIPT>
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)
etc....
i am sure it's a simple bug, but i can;t figure which is it...
Thank you!
- 11-08-2011, 06:35 PM #2
Similar Threads
-
Java Applet Strange Image Loading Problem
By 1yuchen in forum Java AppletsReplies: 36Last Post: 01-06-2012, 03:06 AM -
Getting Focus in an embedded applet? And strange error reports
By Reskaillev in forum New To JavaReplies: 12Last Post: 07-25-2011, 04:25 PM -
Loading Applet in a web browser
By techbossmb in forum Java AppletsReplies: 2Last Post: 09-30-2009, 02:57 AM -
Why is one applet loading but the other isn’t?
By spmchugh82 in forum Java AppletsReplies: 1Last Post: 01-26-2009, 04:39 PM -
Java applet strange painting behaviour
By sirdori in forum New To JavaReplies: 1Last Post: 01-07-2009, 02:14 PM
Bookmarks