Run testchooser from commandline + other install pecularities

I just installed jME through CVS in netbeans 6.0 beta under windows XP by following the guide to do this in netbeans 5.



First, I am missing lwjgl_fmod3.jar in my jMElib directory, is it no longer part of the jme cvs distribution? the guide was talking about adding that library anyway.



jarfiles in the lib directory:

08/17/2007  09:29 PM          196,762 jinput.jar

04/19/2007  04:29 PM            6,839 jogg-0.0.7.jar

04/19/2007  04:29 PM            58,917 jorbis-0.0.15.jar

02/05/2007  07:23 PM          112,249 junit-4.1.jar

10/19/2007  08:52 PM          557,755 lwjgl.jar

08/17/2007  09:29 PM            20,706 lwjgl_util_applet.jar



second, when running jme in netbeans, I successfully get the testchooser and can load the demo's. However, doing this from the commandline, I get:




Oct 28, 2007 1:26:24 PM jmetest.TestChooser start
INFO: Composing Test list...
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/Sys
        at jmetest.TestChooser.start(Unknown Source)
        at jmetest.TestChooser.main(Unknown Source)



from the following command:


E:workspacejavapackagesjmebuild>java -Djava.library.path="e:workspacejavap
ackagesjmelib" -cp "e:workspacejavapackagesjmelibjinput.jar";"e:workspac
ejavapackagesjmelibjogg-0.0.5.jar";"e:workspacejavapackagesjmelibjorbis
-0.0.12.jar";"e:workspacejavapackagesjmeliblwjgl.jar";"e:workspacejavapac
kagesjmeliblwjgl_fmod3.jar";. jmetest.TestChooser



removing lwjgl_fmod3.jar part from the command doesn't help ofcourse. It seems like I somehow got an incomplete distribution, but how? and how can I fix this?

I forgot to mention that, however the demo's do work with lwjgl, generating javadoc in netbeans gives errors saying that package org.lwjgl doesn't exist:


E:workspacejavapackagesjmesrccomjmescenestateVertexProgramState.java:39: package org.lwjgl does not exist
import org.lwjgl.BufferUtils;
E:workspacejavapackagesjmesrccomjmescenestateFragmentProgramState.java:39: package org.lwjgl does not exist
import org.lwjgl.BufferUtils;



and


E:workspacejavapackagesjmesrccomjmeinputcontrolsbindingKeyboardBinding.java:34: package org.lwjgl.input does not exist
import org.lwjgl.input.Keyboard;
E:workspacejavapackagesjmesrccomjmeinputcontrolsbindingMouseButtonBinding.java:34: package org.lwjgl.input does not exist
import org.lwjgl.input.Mouse;
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystick.java:39: package net.java.games.input does not exist
import net.java.games.input.Rumbler;
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystick.java:41: package org.lwjgl.input does not exist
import org.lwjgl.input.Controller;
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystick.java:52: cannot find symbol
symbol  : class Controller
location: class com.jme.input.joystick.lwjgl.LWJGLJoystick
    private Controller controller;
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystick.java:53: cannot find symbol
symbol  : class Rumbler
location: class com.jme.input.joystick.lwjgl.LWJGLJoystick
    private Rumbler[] rumblers;
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystick.java:55: cannot find symbol
symbol  : class Controller
location: class com.jme.input.joystick.lwjgl.LWJGLJoystick
    LWJGLJoystick( Controller controller ) {
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystickInput.java:37: package org.lwjgl does not exist
import org.lwjgl.LWJGLException;
E:workspacejavapackagesjmesrccomjmeinputjoysticklwjglLWJGLJoystickInput.java:38: package org.lwjgl.input does not exist
import org.lwjgl.input.Controllers;
...



it does build successful however.

I’m quite sure my cvs version of jME is incomplete regarding the lwjgl package. I just tried to do the first part of the flag rush game tutorial:



import com.jme.app.SimpleGame;
 
public class Lesson1 extends SimpleGame {
   /**
    * Main method is the entry point for this lesson. It creates a
    * SimpleGame and tells the dialog to always appear. It then
    * starts the main loop.
    * @param args
    */
   public static void main(String[] args) {
      Lesson1 app = new Lesson1();
       app.setDialogBehaviour(ALWAYS_SHOW_PROPS_DIALOG);
       app.start();
   }
    
        protected void simpleInitGame() {
      
   }
 
}



and it gave me the following errors:


init:
deps-jar:
Deleted 1 out of date files in 0 seconds
Compiling 1 source file to E:workspacenetbeansflag rush tutbuildclasses
compile:
run-single:
Oct 28, 2007 5:13:55 PM com.jme.app.BaseGame start
INFO: Application started.
Oct 28, 2007 5:13:55 PM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
Oct 28, 2007 5:13:55 PM com.jme.system.PropertiesIO load
WARNING: Could not load properties. Creating a new one.
Oct 28, 2007 5:13:55 PM class Lesson1 start()
SEVERE: Exception in game loop
java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
        at com.jme.app.AbstractGame.getAttributes(Unknown Source)
        at com.jme.app.BaseGame.start(Unknown Source)
        at Lesson1.main(Lesson1.java:13)
Oct 28, 2007 5:13:55 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
        at com.jme.system.lwjgl.LWJGLSystemProvider.getDisplaySystem(Unknown Source)
        at com.jme.system.DisplaySystem.getDisplaySystem(Unknown Source)
        at com.jme.util.TextureManager.doTextureCleanup(Unknown Source)
        at com.jme.app.BaseSimpleGame.cleanup(Unknown Source)
        at com.jme.app.BaseGame.start(Unknown Source)
        at Lesson1.main(Lesson1.java:13)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)



but how can this have gone wrong, really?

the guide is propably a bit outdated and lists jars with wrong version numbers and lwjgl_fmod3.jar has been removed thats true.

just add all the jars inside the lib directory.



i am not sure why you get those exceptions.

i would try to remove the whole project and set it up again from scratch.

maybe something has gone wrong with your first try.

I forgot to mention that, however the demo's do work with lwjgl, generating javadoc in netbeans gives errors saying that package org.lwjgl doesn't exist:


Sources for lwjgl are not included in jme, only the compiled lib afaik, so javadoc can't find them and complains about it.

SEVERE: Exception in game loop
java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
        at com.jme.app.AbstractGame.getAttributes(Unknown Source)
        at com.jme.app.BaseGame.start(Unknown Source)
        at Lesson1.main(Lesson1.java:13)



...seem to be a classpath - problem to me.

I usually set up classpaths in netbeans (5.5.1) by using class librarys. Choose Tool -> Library Manager from the Menue and create a lib named jme then add all and every .jar
that You happen to find beneath the jme project folder (ok, maybe You could be more selective here).
After that You can reference them by adding the jme library to Your projects lib's (in project properties).

hth
Martin