Exception in game loop java.lang.NullPointerException

Hi every body, I'm an Italian student so forgive me for my bad English!!



I have downloaded jME 2.0 jar from GoogleCode (or something like that) and imported jME and lwjgl jar files into my project on eclipse, then I tried to run the following (simple) code:



import com.jme.app.SimpleGame;





public class provaJME extends SimpleGame{



public static void main(String[] args) {

      provaJME main = new provaJME();

      main.setConfigShowMode(ConfigShowMode.ShowIfNoConfig);

      main.start();

  }



protected void simpleInitGame() {



  }



}





and the result is this:



29-apr-2009 14.05.08 com.jme.app.BaseGame start

INFO: Application started.

29-apr-2009 14.05.09 class provaJME start()

GRAVE: Exception in game loop

java.lang.NullPointerException

at com.jme.system.AbstractGameSettings.assignDefaults(AbstractGameSettings.java:168)

at com.jme.system.PropertiesGameSettings.<init>(PropertiesGameSettings.java:100)

at com.jme.system.PropertiesGameSettings.<init>(PropertiesGameSettings.java:78)

at com.jme.app.BaseGame$BaseGameSettings.<init>(BaseGame.java:199)

at com.jme.app.BaseGame.getNewSettings(BaseGame.java:175)

at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:205)

at com.jme.app.BaseGame.start(BaseGame.java:67)

at provaJME.main(provaJME.java:10)

29-apr-2009 14.05.09 com.jme.app.BaseSimpleGame cleanup

INFO: Cleaning up resources.

29-apr-2009 14.05.09 com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

29-apr-2009 14.05.09 com.jme.app.BaseGame start

INFO: Application ending.





Can anyone help me??? My OS is Windows Vista and i have an NVIDIA GeeForce 8400m GS


Do the other tests work? did you try AlwaysShow instead ShowIfNoConfig?

ok problem solved. Instead of using .jar downloaded from googleCode i have downloaded jME from cvs and now it works!!

Hello,



from germany,but having same problem.



Downloaded jME2 via svn and tried the SimpleGameTutorial(Lesson1)



Validation via jmetest was successful, they are working and showing the configDialog. (even if the properties are not loaded correctly and newly generated(as Console states)).



At first i got the ClassDefNotFound for missing lwjgl, but as i added this to the JME User(and system) library it worked better.



Exception is:

java.lang.NullPointerException

at com.jme.system.AbstractGameSettings.assignDefaults(AbstractGameSettings.java:168)

at com.jme.system.PropertiesGameSettings.<init>(PropertiesGameSettings.java:100)

at com.jme.system.PropertiesGameSettings.<init>(PropertiesGameSettings.java:78)

at com.jme.app.BaseGame$BaseGameSettings.<init>(BaseGame.java:199)

at com.jme.app.BaseGame.getNewSettings(BaseGame.java:175)

at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:205)

at com.jme.app.BaseGame.start(BaseGame.java:67)

at lesson1.Lesson1.main(Lesson1.java:48)



i rewrote the code in AbstractGameSettings and assume that the Classloader, in this case is "null", so the .getRessourceAsStream(propFileName) fails.



System is and XP-Home with a GeForce Go 6800 (Laptop), working with eclipse.



I will try to make my project a plugIn and make a plugin for jme(via building it out of the jars),maybe this would help a bit.



Are there any other solutions?



Thanxin advance

Nebelritter





Edit:

making it a plug in leads to the lwjgl not in library path error. Using PlugIns all buildpath issues are complex(from my state of experience) so adding it to the test or the jme PlugIn did not work. JmePlugIn already consists of lwjgl, but somehow this seems not to be in the library path



Edit 2:

Made it work now.

Sorry i don't know exactly how.

I made a new PlugIn containing the .jars  from the jem.target directory and the .jars from the referenced librarys.

Than added this PlugIn as dependency and registered it via eclipse buddy loading.

experimented a lot and somehow it worked