Printing whole exception.

So I have this problem. My LWJGL game (Engine prototype) works well as an applet in eclipse. Once I try to run it with html in browser, it won’t start. Intead, it gives me this exception.

java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
	at com.chrisindiegames.game.GameApplet.startLWJGL(GameApplet.java:59)
	at com.chrisindiegames.game.GameApplet.access$0(GameApplet.java:53)
	at com.chrisindiegames.game.GameApplet$1.addNotify(GameApplet.java:35)
	at java.awt.Container.addImpl(Unknown Source)
	at java.awt.Container.add(Unknown Source)
	at com.chrisindiegames.game.GameApplet.init(GameApplet.java:44)
	at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 9 more

The problem is that I can’t see the whole “tree” of calls made. I don’t know where the error occurred, because exception is printing “… 9 more” instead of printing them out. Is there a way to make java print all the exception without the “… x more” ?

Here is a quick answer from stackoverflow, but it doesn’t really help :stuck_out_tongue:

Have you tried e.printstacktrace ?

Your error occurs because you don’t have the applet properly setup. It can’t find the LWJGL JAR.

Checkout http://www.lwjgl.org/wiki/index.php?title=Deploying_with_the_LWJGL_Applet_Loader_-_Introduction

That’s just a call to print the stack trace, which it’s already doing.

@OP: The exception always occurs at the top of the stack, which would be:

[quote]at com.chrisindiegames.game.GameApplet.startLWJGL(GameApplet.java:59)
[/quote]

You actually do see all the stacktrace elements. The ‘9 more…’ refers to stacktrace elements that have been de-duplicated from the parent. As you can see, the parent has the 9 stacktrace elements that both exceptions have in common (as their root elements).

You’re kinda wrong. What the problem is that first off all, file.getAbsolutePath() requires applet to be signed. I haven’t signed the applet yet when this error was posted. Second, I can’t load natives properly for some reason. Still working on it. The library is inside the game.jar file already.

The library being inside the game.jar doesn’t mean anything.

Your exception:


Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException

Is very straightforward, it can’t find that class.

You have more than one problem yes… but you also need to figure out how to bundle up a LWJGL application for an applet.