Search code examples
javalwjgl

Use LWJGL 3 From Command-Line


I'm trying to implement LWJGL 3 from the command-line, but I'm running into some problems. I put LWJGL.jar in my "classes" and "sources" directories, but when I try to compile, it complains that all the LWJGL classes don't exist. Thank's for any help!


Solution

  • I know, I know, I'm answering my own question, but here goes. This is the command I'm using now to usr LWJGL (and other libraries):

    In order to compile: javac -cp lib/*.jar SourceFile.java

    In order to run: java -cp lib/.jar:. -Djava.library.path=native/ ClassFile

    This is what works for me. I hope this helped!