views:

38

answers:

3

Hello,

I want to use the LWJGL library in Eclipse, I extracted the files into C:\javalibs\lwjgl. Now when I try to test the LWJGL library like this:

C:\javalibs\lwjgl>java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar;jar\jinput.jar; -Djava.library.path=C:\javalibs\lwjgl\native\windows org.lwjgl.test.WindowCreationTest

Normally there should open a game window from LWJGL, but DOS says that java is a non valid command or wrongly spelled.

What am I doing wrong?

Thank you very much!

A: 

Is java added to the PATH environment of Windows?

My Computer -> Properties -> Advanced -> System Variables -> Path

add the path-to-java-bin-folder and reboot or login/logout and it should work.

Redlab
+1  A: 

Try java -version first - if this does not show java version information, make sure you have a Java installed and the path to the java.exe file on your PATH environment variable.

Andreas_D
now I have set the ;C:\Programs (x86)\Java\jdk1.6.0_20\bin to the system environment variables and after reboot when I type java -version in the DOS command window it says another time that java is a non valid command or wrongly spelled
qzar
A: 

Now I have solved the problem with the java environment path and the following command:

C:\javalibs\lwjgl>java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\lwjgl_fmod3.jar;jar\lwjgl_devil.jar;jar\jinput.jar; -Djava.library.path=C:\javalibs\lwjgl\native\windows org.lwjgl.test.WindowCreationTest

works fine and returns the LWJGL game window.

Thank you very much.

qzar