2

I have a simple LWJGL java application. And if I try calling it using:

java -jar=LWJGL_Fullscreen.jar -Djava.library.path="M:\Java\SE\LWJGL_Fullscreen\final\lib\native\windows\"

i get the following error message:

Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries

but the path set using -Djava.library.path is correct. If i am using Netbeans and hit the run button the application starts and runs as expected.

how can i start this program from console?

UDAPTE

As suggested by david i have also tryed:

java -Djava.library.path="M:\Java\SE\LWJGL_Fullscreen\final\lib\native\windows\" -jar=LWJGL_Fullscreen.jar
java -Djava.library.path="M:\Java\SE\LWJGL_Fullscreen\final\lib\native\windows\" -jar LWJGL_Fullscreen.jar
java -jar LWJGL_Fullscreen.jar -Djava.library.path="M:\Java\SE\LWJGL_Fullscreen\final\lib\native\windows\" 

unfortunately these didn't work either. I got the same output as before.

Le_Morri
  • 1,619
  • 14
  • 18
  • http://stackoverflow.com/questions/5045608/proper-usage-of-java-d-command-line-parameters might help. Just try putting the -D before the -jar – david Apr 27 '13 at 17:31
  • doesn't help... if i put the `-D` between the `-jar` and the file name java just stops working. – Le_Morri Apr 28 '13 at 09:59
  • That is quite possible, if you put the -Djava.library... part between -jar and the filename, java will think the jar to be executed is -Djava.lib... instead of the file. Did you try putting the whole -Djava.lib.. thing before the -jar? The command would be `java -Djava.library.path="M:\Java\SE\LWJGL_Fullscreen\final\lib\native\windows\" -jar=LWJGL_Fullscreen.jar` – david Apr 28 '13 at 18:15
  • yes. same result as in the question. – Le_Morri Apr 29 '13 at 12:43
  • It might also be something totally different, an incompatibility of libraries or some missing dependency. Hope that this time it is helpful :-) http://stackoverflow.com/questions/2516890/error-occurred-during-initialization-of-vm – david Apr 29 '13 at 15:56
  • ok.. it won't work with 64bit java... that's kind of strange... – Le_Morri Apr 29 '13 at 16:05

0 Answers0