Another problem

I am trying to run the demo from the "getting started" guide and I get the following error:



C:JMEprojectsjme>java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg

-0.0.5.jar;./lib/jorbis-0.0.12.jar;./target/jme.jar;./target/jmetest.jar;./targe

t/jmetest-data.jar jmetest.effects.TestDynamicSmoker

Exception in thread "main" java.lang.NoClassDefFoundError: com/jmex/effects/Part

icleManager



C:JMEprojectsjme>



Ant gave no errors at all when I built and tested it, and I am in the directory I ran ant from. What am I doing wrong?



Thanks,

Matt

There are now multiple jars built (jmex are extension jars). So, make sure you include the effects jar in your classpath.



I’ll update the Getting Started guide one of these days…

OK, everything seems to work except the fps display. I seem to remember seeing a post where someone had this same problem, so I will try and find it. Thanks again for the help!



-Matt

update build.xml, the fps error was due to the font file not being put into the jar.

heh, well then that should fix several threads on here. :slight_smile:

Are you sure the files you are pointing to in your cmd line are where you think they are?  Especially ./target/jmetest.jar.  I'd double check that and also pop it open with winzip and see if the class is in there.

Thanks, renanse.  My jME install is fine, as will be noted later, but for the record here's what I found based on your post.



The files are in c:jmetarget…


C:jmetarget>dir
 Volume in drive C has no label.
 Volume Serial Number is 8012-707C

 Directory of C:jmetarget

07/09/2005  08:30 AM    <DIR>          .
07/09/2005  08:30 AM    <DIR>          ..
07/09/2005  09:40 AM            43,661 jme-effects.jar
07/09/2005  09:40 AM           246,951 jme-model.jar
07/09/2005  09:40 AM            83,561 jme-sound.jar
07/09/2005  09:40 AM            36,373 jme-terrain.jar
07/09/2005  09:40 AM            44,323 jme-ui.jar
07/09/2005  09:40 AM         1,083,504 jme.jar
07/09/2005  08:30 AM         3,684,070 jmetest-data.jar
07/09/2005  09:40 AM            28,172 jmetest.jar
               8 File(s)      5,250,615 bytes
               2 Dir(s)  137,405,992,960 bytes free



However,you are correct in that the jar doesn't contain that test class (jmetest.effects.TestDynamicSmoker).

C:jmetarget>jar tf jmetest.jar | more
META-INF/
META-INF/MANIFEST.MF
jmetest/
jmetest/TutorialGuide/
jmetest/TutorialGuide/HelloAnimation.class
jmetest/TutorialGuide/HelloIntersection$BulletMover.class
jmetest/TutorialGuide/HelloIntersection$FireBullet.class
jmetest/TutorialGuide/HelloIntersection.class
jmetest/TutorialGuide/HelloKeyInput.class
jmetest/TutorialGuide/HelloKeyframes.class
jmetest/TutorialGuide/HelloLOD.class
jmetest/TutorialGuide/HelloModelLoading.class
jmetest/TutorialGuide/HelloMousePick.class
jmetest/TutorialGuide/HelloNode.class
jmetest/TutorialGuide/HelloSimpleGame.class
jmetest/TutorialGuide/HelloStates.class
jmetest/TutorialGuide/HelloTerrain.class
jmetest/TutorialGuide/HelloTriMesh.class
jmetest/TutorialGuide/HelloWorld.class
jmetest/base/
jmetest/base/TestSimpleGame.class
jmetest/curve/
jmetest/curve/TestBezierCurve.class
META-INF/INDEX.LIST



Re-keyed the command based on a class that is in the jar listing from above (HelloTerrain)...

C:jme>java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.5.jar;./lib/jorbis-0.0.12.jar;./target/jme.jar;./target/jme-terrain.jar;./target/jmetest.jar;./target/jmetest-data.jar;./target/jme-effects.jar jmetest.TutorialGuide.HelloTerrain



SimpleGame calls properties correctly and launches a render window for a split second then it closes on this error:

Jul 9, 2005 2:39:57 PM com.jme.scene.Node attachChild
INFO: Child (midpoint block) attached to this node (rootNode)
java.lang.NullPointerException
        at javax.swing.ImageIcon.<init>(Unknown Source)
        at jmetest.TutorialGuide.HelloTerrain.complexTerrain(Unknown Source)
        at jmetest.TutorialGuide.HelloTerrain.simpleInitGame(Unknown Source)
        at com.jme.app.SimpleGame.initGame(Unknown Source)
        at com.jme.app.BaseGame.start(Unknown Source)
        at jmetest.TutorialGuide.HelloTerrain.main(Unknown Source)



However, jME is fine because HelloTriMesh does run successfully.  Thanks for all your help renanse you got me moving in the right direction. 

Your jmetest jar is substantially smaller than it should be. Try rebuilding all of jme.



/jme/location/ant clean

/jme/location/ant dist-all

/jme/locatiion/ant dist-test



this should rebuild all of jme.



then do a jar tf target/jmetest.jar



see if that works.

Thanks mojomonk.  I checked the source files against another system and found just enough for ant and some tutorials to work.  Looks like my CVS checkout bombed.  Did another checkout and everything is fine.



Thanks for all the help renanse and mojomonk.