Applet Launcher not working

OK I have jME running on the java virtual machine inside NetBeans, but when I embed the applet-based launcher in an html page, I get this:



java.lang.NoClassDefFoundError: com/jme/app/SimpleGame

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at myGame.Main.init(Main.java:18)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.ClassNotFoundException: com.jme.app.SimpleGame

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

… 11 more



Is there any sort of setup I need to do to get jME/lwjgl to install itself for users, or do the users need to setup something in order to play it through the browser? I'm using NetBeans 6.5, is there anything I have to change in the project properties? Thanks.

you need to make sure that the jME libs are there at runtime.  In netbeans under the project properties->libraries->run you need to supply the needed jar files, not a library (I think).



*Netbeans wont copy any jars, to the lib folder, that are included from a library. So to prepare for distro you might want to include all the needed jar files explicitly (and NOT use any libraries).

basixs said:

*Netbeans wont copy any jars, to the lib folder, that are included from a library.

Yes it will. You just have to clean/build instead of just run your project.

lol, I guess your right.  there is just an issue here…



I would suggest un-zipping the jar file and taking a look at the manifest, that should have all the dependencies it needs listed…

Well, I'm using a regular Java Applet to load and display the rest of the program without a permanant download. The applet works fine when I just click Run, but that's running through an Applet emulator. How do I properly embed the jME-using applet into an HTML file? The normal method displays the above when launched.

I would suggest un-zipping the jar file and taking a look at the manifest, that should have all the dependencies it needs listed.

What was the result of this??
Did you locate any reference in there to all the external jar files needed (such as lwjgl.jar) and their location, and if so was it correct (/lib)?