gossfunkel
gossfunkel

Reputation: 257

Informing java where to import from (lib)

I'm using java from command line and coding in gedit, and am having trouble importing lwjgl.

I have my source code under src/uk/co/gossfunkel and have the lwjgl.jar in lib>jars and the natives under lib>natives. How do I let the compiler know that the import org.lwjgl.*; statement refers to org.lwjgl in lib>jars?

Upvotes: 0

Views: 114

Answers (1)

JB Nizet
JB Nizet

Reputation: 692043

javac -cp /path/to/lib/jars/lwjgl.jar ... 

for Unix.

javac -cp c:\path\to\lib\jars\lwjgl.jar ... 

for Windows.

See http://docs.oracle.com/javase/1.3/docs/tooldocs/solaris/classpath.html or http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/classpath.html for more explanations.

Upvotes: 5

Related Questions