Compilation seems Ok,but I can't run the demos

Hi everbody…



I need some help.Everything is in the title of the topic:I've been able to compile jME but when I try to run the demos(like it's explained in the "Getting started" section),here is what the compiler returns:






C:Program FilesGNUWinCvs 2.0jme>java -Djava.library.path=./lib -cp ./lib/lwj
gl.jar;./lib/jogg-0.0.7.jar;./lib/jorbis-0.0.15.jar;./target/jme.jar;./target/jm
etest.jar;./target/jmetest-data.jar jmetest.effects.TestDynamicSmoker
Exception in thread "main" java.lang.NoClassDefFoundError: com/jmex/effects/part
icles/ParticleMesh

C:Program FilesGNUWinCvs 2.0jme>java -Djava.library.path=./lib -cp ./lib/lwj
gl.jar;./lib/jogg-0.0.7.jar;./lib/jorbis-0.0.15.jar;./target/jme.jar;./target/jm
e-effects.jar;./target/jme-model.jar;./target/jme-sound.jar;./target/jme-terrain
.jar;./target/jmetest.jar;./target/jmetest-data.jar
Usage: java [-options] class [args...]
          (to execute a class)
  or  java [-options] -jar jarfile [args...]
          (to execute a jar file)

where options include:
    -client      to select the "client" VM
    -server      to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument

    -splash:<imagepath>
                  show splash screen with specified image



Thanks for any help...

Make sure all the jars in the target directory are on the classpath (you're missing quite a few).



I'd really recommend using an IDE though.

llama said:

Make sure all the jars in the target directory are on the classpath (you're missing quite a few).

I'd really recommend using an IDE though.


Well,I simply chose to make all the compilation steps and execution of the demos as stated in the Getting Started tutorial...
But you are right:one jar is missing,the jmetest-data.jar...Or maybe that command I simply copied from the tutorial(before modifying the version numbers of the libraries) must not work with the current jar files,since they can change from version to version(jME)...
It could simply be that jar file was actually "split" in six files,all beginning with "jmetest-data-."
Well,I'll make another try...

Thanks for the help.
And for the IDE,I'll try using JCreator(or Eclipse).

Still doesn' work in the command prompt with the correct JARs…

So I'll try running these demos with JCreator…

johnstanp said:


Well,I simply chose to make all the compilation steps and execution of the demos as stated in the Getting Started tutorial...
But you are right:one jar is missing,the jmetest-data.jar...Or maybe that command I simply copied from the tutorial(before modifying the version numbers of the libraries) must not work with the current jar files,since they can change from version to version(jME)...
It could simply be that jar file was actually "split" in six files,all beginning with "jmetest-data-."
Well,I'll make another try...

Thanks for the help.
And for the IDE,I'll try using JCreator(or Eclipse).


Unfortunatly wiki articles don't automagically stay up to date (escp cause hardly anyone uses "getting started" and instead look at Eclipse or Netbeans). Feel free to update the wiki article if you get it to work.
johnstanp said:

But you are right:one jar is missing,the jmetest-data.jar...



A lot more are missing!
compare this list:
target/jme.jar;./target/jme-effects.jar;./target/jme-model.jar;./target/jme-sound.jar;./target/jme-terrain
.jar;./target/jmetest.jar;./target/jmetest-data.jar

to what's in your target directory. ALL the jars in the target have to be in that list. And you have to specify which class you want to start, of course
llama said:

johnstanp said:

But you are right:one jar is missing,the jmetest-data.jar...



A lot more are missing!
compare this list:
target/jme.jar;./target/jme-effects.jar;./target/jme-model.jar;./target/jme-sound.jar;./target/jme-terrain
.jar;./target/jmetest.jar;./target/jmetest-data.jar

to what's in your target directory. ALL the jars in the target have to be in that list. And you have to specify which class you want to start, of course


All the JARs files are in the target directory,except the jmetest-data.jar...
When I wrote there was only one file missing it was about the files I tried to compile,since an error can only be generated if a file,one tries to compile,is missing independantly of the files present in the directory...

Anyway,I've got exactly the same error with the JCreator IDE(easier to configure for the classpath since I didn't find the info in the help files of Eclipse?).Is there a tutorial on Eclipse?

And actually,I don't have the jmetest-data.jar,instead I have got six files:

jmetest-data-cursor.jar
jmetest-data-images.jar
...

I guess that the jmetest-data.jar has been split in the six files I mentionned(only two in fact) in the current release...

Well,I'm reading the Eclipse guide…

Not that difficult to find…

Well,I've done everything from the start(Eclipse Guide)…

I've been able to run some demos(I've not tried everything),but there was a problem:Eclipse returned 1485 problems,the first 100 coming from OpenAL…



Severity and Description Path Resource Location Creation Time Id
AL cannot be resolved jME/src/com/jmex/audio/openal OpenALSystem.java line 75 1190020191967 1366
The field AseToJme.ASEModelCopy.FACE_NORMAL is never read locally jMonkeyEngine/src/com/jmex/model/converters AseToJme.java line 120 1190024943529 4131
AL cannot be resolved jME/src/com/jmex/audio/openal OpenALSystem.java line 106 1190020191967 1372
AL cannot be resolved jME/src/com/jmex/audio/openal OpenALSystem.java line 252 1190020191967 1380
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 64 1190020191904 1240
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 65 1190020191904 1241
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 67 1190020191904 1242
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 68 1190020191904 1243
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 71 1190020191904 1244
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 78 1190020191904 1245
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 82 1190020191904 1246
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 82 1190020191904 1247
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 86 1190020191904 1248
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 86 1190020191904 1249
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 94 1190020191904 1250
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 94 1190020191904 1251
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 98 1190020191904 1252
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 98 1190020191904 1253
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALAudioBuffer.java line 107 1190020191904 1254
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALEar.java line 61 1190020191920 1263
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALEar.java line 61 1190020191920 1264
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALEar.java line 62 1190020191920 1265
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALEar.java line 62 1190020191920 1266
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALEar.java line 73 1190020191920 1267
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALEar.java line 73 1190020191920 1268
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 72 1190020191920 1270
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 77 1190020191920 1271
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 77 1190020191920 1272
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 82 1190020191920 1273
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 88 1190020191920 1274
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 97 1190020191920 1275
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 107 1190020191920 1276
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 107 1190020191920 1277
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 108 1190020191920 1278
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 108 1190020191920 1279
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 109 1190020191920 1280
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 109 1190020191920 1281
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 110 1190020191920 1282
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 110 1190020191920 1283
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 110 1190020191920 1284
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 110 1190020191920 1285
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 112 1190020191920 1286
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 112 1190020191920 1287
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 113 1190020191920 1288
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 122 1190020191920 1289
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 122 1190020191920 1290
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 122 1190020191920 1291
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 122 1190020191920 1292
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 130 1190020191920 1293
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 139 1190020191920 1294
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 140 1190020191920 1295
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 149 1190020191920 1296
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 149 1190020191920 1297
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 149 1190020191920 1298
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 149 1190020191920 1299
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 157 1190020191920 1300
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 157 1190020191920 1301
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 158 1190020191920 1302
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALMemoryAudioPlayer.java line 158 1190020191920 1303
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 60 1190020191936 1305
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 60 1190020191936 1306
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 65 1190020191936 1307
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 65 1190020191936 1308
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 70 1190020191936 1309
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 70 1190020191936 1310
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 75 1190020191936 1311
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 75 1190020191936 1312
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 80 1190020191936 1313
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 80 1190020191936 1314
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 86 1190020191936 1315
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 86 1190020191936 1316
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 91 1190020191936 1317
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALPropertyTool.java line 91 1190020191936 1318
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALSource.java line 48 1190020191936 1320
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 90 1190020191951 1322
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 113 1190020191951 1323
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 126 1190020191951 1324
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 142 1190020191951 1325
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 160 1190020191951 1326
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 160 1190020191951 1327
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 161 1190020191951 1328
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 161 1190020191951 1329
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 162 1190020191951 1330
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 162 1190020191951 1331
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 163 1190020191951 1332
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 163 1190020191951 1333
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 164 1190020191951 1334
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 164 1190020191951 1335
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 173 1190020191951 1336
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 196 1190020191951 1337
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 199 1190020191951 1338
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 230 1190020191951 1339
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 236 1190020191951 1340
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 236 1190020191951 1341
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 241 1190020191951 1342
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 260 1190020191951 1343
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 261 1190020191951 1344
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 264 1190020191951 1345
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 285 1190020191951 1346
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 289 1190020191951 1347
AL10 cannot be resolved jME/src/com/jmex/audio/openal OpenALStreamedAudioPlayer.java line 307 1190020191951 1348


what's wrong?

I am no Eclipse expert, but there seems to be a syntax scanning problem, and not really a compiling/running problem. Eclipse is picky with Java syntax, and will complain from everything, including having unused imports and the like. I would say they are not really that important if they don't hinder your ability to run and compile your program.

No, it's definatly complaining it can't find the AL class. Are you sure you added lwjgl.jar and the other libs to the build path? (step 10)



It's weird cause this guide worked for dozens of people and I never saw this problem come up…

If you're using Java6+ you can do a -cp /lib/* to get all the .jars from the path!