LWJGL cannot find class error when using "java <class file>" command

Started by brain56, August 15, 2011, 09:36:53

Previous topic - Next topic

brain56

I successfully compiled my source using this command:

    javac -classpath "..\lwjgl-2.7.1\jar\lwjgl.jar" Game.java

However, when I try to run it using:

    java -classpath "..\lwjgl-2.7.1\jar\lwjgl.jar" Game

, it gives me an error:

    Error: Could not find or load main class Game

What have I done wrong!? :(

I am certain that there are no syntactical errors and class labeling anomalies.

I've also tried running the program using this command, but still nothing. T.T
   
     java -cp "..\lwjgl-2.7.1\jar\lwjgl.jar" -Djava.library.path="..\lwjgl-2.7.1\native\windows" Game

kulpa

Game.class is not in your classpath!

Add the current working directory to classpath.

java -cp "..\lwjgl-2.7.1\jar\lwjgl.jar;." -Djava.library.path="..\lwjgl-2.7.1\native\windows" Game

(added . to cp)