Hey all,
I recently installed the jME framework and, for some reason, am having trouble getting the examples to run. I currently am doing a Java course and have been fine running Java stuff in the past.
Anywhoo I've followed the "chapter_1_-_getting_started" wiki page to the letter, but am having trouble in the "Step 6: Testing jME" section. It says to run a command similar to:
java -D java.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.7.jar;./lib/jorbis-0.0.15.jar;./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;./target/jme-awt.jar
[adjusted because some of the version numbers in the wiki command are out of date]
However I always get the error:
Exception in thread "main" java.lang.NoClassDefFoundError: java/library/pat
ib
Caused by: java.lang.ClassNotFoundException: java.library.path=…lib
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: java.library.path=./lib. Program will exit.
I get similar errors when running the following, too:
java -D java.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.7.jar;./lib/jorbis-0.0.15.jar;./target/jme.jar;./target/jmetest.jar;./target/jmetest-data.jar jmetest.effects.TestDynamicSmoker
Any ideas why this is?
Thanks,
Tristan Perry
EDIT: Seems to be working now. I set the classpath and the example programs are running as expected?
Thanks, have tried running:
java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.7.jar;./lib/jorbis-0.0.15.jar;./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;./target/jme-awt.jar
(As per the wiki) but the command doesn't go anything at all. It just runs as though I typed solely "java":
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 file
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 versio
-? -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. -agen
see also, -agentlib:jdwp=help and -agentlib:h
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.
-splash:<imagepath>
show splash screen with specified image
tristanperry said:
It just runs as though I typed solely "java":
That's your hint to what's wrong. You did not specify any class to run. The User's Guide explains what classes you can run and how to do it just a few paragraphs below the line you pasted above.
hevee said:
tristanperry said:
It just runs as though I typed solely "java":
That's your hint to what's wrong. You did not specify any class to run. The User's Guide explains what classes you can run and how to do it just a few paragraphs below the line you pasted above.
Ahh that makes sense, thanks :)
Was just having a slow moment/day I think! XD