I can't run anything

Hi,

I followed the tutorial here: http://www.jmonkeyengine.com/wiki/doku.php?id=downloading_and_installing_jme_2.x

to build jars in eclipse. Everything works fine (even with some warning), but when i try to run a simple script like:



import com.jme.app.SimpleGame;

public class HelloWorld extends SimpleGame {

   public static void main(String[] args) {
     HelloWorld main = new HelloWorld();
      main.setConfigShowMode(ConfigShowMode.ShowIfNoConfig);
      main.start();
   }

   protected void simpleInitGame() {

   }
}



Eclipse reports me the following error:


3-dic-2008 11.33.49 com.jme.app.BaseGame start
INFO: Application started.
3-dic-2008 11.33.49 com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
3-dic-2008 11.33.49 com.jme.system.PropertiesGameSettings load
AVVERTENZA: Could not load properties. Creating a new one.
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: [Lorg/lwjgl/opengl/DisplayMode;
   at java.lang.Class.getDeclaredMethods0(Native Method)
   at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
   at java.lang.Class.getDeclaredMethod(Class.java:1935)
   at java.awt.Component.isCoalesceEventsOverriden(Component.java:5819)
   at java.awt.Component.access$300(Component.java:168)
   at java.awt.Component$3.run(Component.java:5773)
   at java.awt.Component$3.run(Component.java:5771)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.awt.Component.checkCoalescing(Component.java:5770)
   at java.awt.Component.<init>(Component.java:5739)
   at java.awt.Container.<init>(Container.java:239)
   at java.awt.Window.<init>(Window.java:324)
   at java.awt.Window.<init>(Window.java:473)
   at java.awt.Dialog.<init>(Dialog.java:655)
   at java.awt.Dialog.<init>(Dialog.java:399)
   at javax.swing.JDialog.<init>(JDialog.java:259)
   at javax.swing.JDialog.<init>(JDialog.java:193)
   at javax.swing.JDialog.<init>(JDialog.java:141)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(LWJGLPropertiesDialog.java:184)
   at com.jme.app.AbstractGame$1.run(AbstractGame.java:236)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.opengl.DisplayMode
   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)
   ... 28 more



Can someone give me some advice? I've tried to fix this for hours, but i can't understand where the problem is...

Thanks!

Looks like you are missing the lwjgl.jar in your classpath. Check out this setup guide: http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme_2 and more specifically the section titled “Resolving the Build Path Issues”.