errOr while fengJME example runtime


hi guYs..

i had this the example written by JOSH from the wiki and
while at runtime i receive this error Code..

SEVERE: Exception in game loop
java.lang.NoClassDefFoundError: org/lwjgl/opengl/glu/GLU
        at org.fenggui.render.lwjgl.LWJGLOpenGL.setOrtho2D(LWJGLOpenGL.java:337)
        at org.fenggui.Display.display(Display.java:202)
        at GameKo.Main.render(Main.java:248)
        at com.jme.app.BaseGame.start(BaseGame.java:87)
        at GameKo.Main.main(Main.java:276)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.opengl.glu.GLU
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 5 more



coUld anyone help me on this?? thanks..

You need to include lwjgl.jar in your classpath.

This problem stems from FengGUI and jME using different versions of the LWJGL library (jME uses the newest ;)).



I can offer you two solutions:

  1. Use this FengGUI jar file: http://www.megaupload.com/?d=BL0Y4NIN
  2. Edit the FengGUI source and recompile



    Edit patch:


Index: LWJGLOpenGL.java
--- LWJGLOpenGL.java Base (BASE)
+++ LWJGLOpenGL.java Locally Modified (Based On LOCAL)
@@ -28,7 +28,6 @@
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;
 import org.lwjgl.opengl.GL13;
-import org.lwjgl.opengl.glu.GLU;
 
 /**
  * @author oliver_carr
@@ -393,7 +392,7 @@
 
   public void setOrtho2D(int left, int right, int bottom, int top)
   {
-    GLU.gluOrtho2D(left, right, bottom, top);
+      GL11.glOrtho( (double) left, (double) right, (double) bottom, (double) top, -1d, 1d );
   }
 
   public void setScissor(int x, int width, int y, int height)




Just so everyone knows, the FengGUI-Examples.jar is still compiled against the old lwjgl, so having that in your class path will cause it not to run… I just spent a few days banging my head (with help from this thread) and thought I'd throw this tidbit out there