ClassNotFound error when running applet in browser?

Hi,
So I am trying to run a little game I made within a browser. I followed the Spin’s tutorial in the wiki but I feel that it left out some important information. I have signed the jar I created from my game and I have all necessary files in the appropriate folder. The HTML is directly copied from the tutorial with the appropriate name changes. Yet I still receive this error

Sun Dec 23 15:41:43 EST 2012 INFO:Clear up
Sun Dec 23 15:41:43 EST 2012 ERROR:org.myorg.SpaceWalk
java.lang.ClassNotFoundException: org.myorg.SpaceWalk
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:124)
	at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
	at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
This occurred while 'Initializing real applet'
Unable to create game container
java.lang.RuntimeException: Unable to create game container
	at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:148)
	at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
	at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

My HTML is here:http://pastebin.com/4fwaUsB1
And a snapshot of my GAME-LIB folder for sanity:

Imgur

This probably won’t be much help, but try using this HTML just to see if your applet actually works. (I barley know anything about HTML or applets but this is how I was told to test them. This only works if you have one class as far as I know.)

<html>
 <body>
 <applet code = "ClassNameHere.class" width=300 height=300>
 </applet>
 </body>
 </html>

Hmmm nope. Another ClassNotFound exception, I tried using both main.class and org.myorg.SpaceWalk.main.class in case it didn’t know which package to look in. I should note though, that this actually displays “Error: Class Not Found” on the screen whereas my HTML simply shows a blank. Thanks for the reply though

EDIT: To be clear though, it runs correctly when I run it from eclipse

Yeah, you are using LWJGL. Which means you are going to need the tutorials to get that specific applet running. You might have to do a bit of looking around, but the link below will give you a good start on how.

Ninja Cave

Well Slick uses LWJGL’s loader so I thought it would be the same? I followed a Slick tutorial this time and I had actually followed that same tutorial you linked previously and ended up with the same error. Frankly, I am starting to wonder if all this time trying to get this browser game running is worth it, with HTML 5 being the new cool kid now. Hell even Javascript looks trendier. Don’t get me wrong, Java is still my language of choice and I think Slick+ Java is awesome for GameDev, but I think I might just hop on the HTML5 bandwagon for my next browser game.

Do try putting all the jars in the same folder as the html file and changing the following part of the html

from

codebase="./GAME-LIB/"

to

codebase="."

Your error basically says it can’t find your game class files (maybe because it can’t find the jars).

No luck :frowning: I tried moving everything to GAME-LIB and I tried putting all the JARS in the root of the folder with the HTML and nadda.

have you got a link to the actual applet ? should make finding the problem much easier.