Using Netbeans IDE for jme

hi all,

I am a newbee to jme. I am using GEL or Netbeans IDE for programming java. I have downloaded the jme nighty build and installed it. But when I tried to run a sample programme i get the following errors:

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

You are missing the .dll files either set your system lib directory to jme/lib or you can put the dll files in your working directory.  (Of course, substitute .so and so forth for other platforms.)

I have an equal Problem!



IDE is Netbeans5.5

OS is WinXP



I build my Project and the file dist/ with lib/ and game.jar in it appears!



if i start it by cmd it doesnt work. Only if i add the Djava.library.path to it which ist dist/lib/. How can i get it working without specify the Djava.library.path in cmd?



I tried to set the working directory on dist/lib/ and copied the DLLs & Jars all over my project files (chaos-like) but this doesnt work too



so both solutions failed…what is my fault?

Did You have a look at: http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_netbeans_5.0_to_build_jme_and_jme-physics_2  ?



… which should cover a lot of the common jme with netbeans setup related questions.


if i start it by cmd it doesnt work. Only if i add the Djava.library.path to it which ist dist/lib/. How can i get it working without specify the Djava.library.path in cmd?


if You refer to the command window ?!? and start the app with sometihing like java -Djava.... -cp... myApp  then You can create a .bat file with the -Djava... and -cp param which is taking the java class as an argument.

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path


You are missing the -Djava.library.path= ...  statement in the vm - arguments setting of the project properties run tab (see above setup guide)
and so as renanse mentioned java can't find the native libs ( .dll on win, .so on linux )


the howto @ wiki doesnt helped me. I done it step by step but the error appeared everytime!



yes sry cmd = Command Window



it works with: java -jar -Djava.library.path="c:blablabladistlib" game.jar

it doesnt work with: java -jar game.jar



so my question is: can i put the command ' -Djava.library.path="c:blablabladistlib" ' into a file inside the jar or is a batch file the only way?



zerni

zerni said:

so my question is: can i put the command ' -Djava.library.path="c:blablabladistlib" ' into a file inside the jar


As far as I'm aware you can't do this.  If there is it would have something to do with the manifest file so you might want to investigate that.
so my question is: can i put the command ' -Djava.library.path="c:blablabladistlib" ' into a file inside the jar or is a batch file the only way?


Hm the only other possible solution i found on the net was to add a special starter class to Your .jar (and manifest) in java that starts the app
in a new vm with the desired params like:

public class StartJar {

   public static void main(String[] args) throws IOException{
     
      Runtime.getRuntime().exec("javaw -Djava.library.path=... -jar -mx320m Test.jar");
   }
}


Sounds good to me!



thanx for advice