Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Show applet in aspx-page

843807Oct 6 2009 — edited Oct 15 2009
I'm not sure I'm posting this question at the correct place but here we go...

I'd like to show the output of a java-file (with a few other java-files) on my website. So I made an applet which works well in a normal html-file in a directory on my computer. But how do I make the same inside the aspx-page? I tried several things. I packed all the java-files in a jar, I signed it, I placed all of it on my site and made the call like this:
+<applet code="/JavaSpil/Collision"+
archive="/CvWebsite/JavaSpil/javaspil.jar"
width="200" height="200">
+</applet>+

which produces this error:

Java Plug-in 1.6.0_15
Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM

load: class /JavaSpil/Collision not found.
java.lang.ClassNotFoundException: .JavaSpil.Collision
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:55063/JavaSpil/Collision.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
+... 7 more+
Exception: java.lang.ClassNotFoundException: .JavaSpil.Collision

How can I make things work?

Thanks in advance!

Best regards,
Kenneth Andersen

Edited by: cogitans on Oct 6, 2009 4:49 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2009
Added on Oct 6 2009
15 comments
315 views