title: Building and running lwjgl program from terminal
body: <p>I'm trying to compile and run a very basic program that uses LWJGL:</p>
  
  <pre><code>import org.lwjgl.LWJGLException;
  import org.lwjgl.opengl.Display;
  
  public class HelloWorld {
       public static void main (String args[]) {
           try {
               Display.setTitle("Hello World");
               Display.create();
           } catch (LWJGLException e) {
               e.printStackTrace();
           }
  
           while (!Display.isCloseRequested()) {
               try {
                   Thread.sleep(100);
               } catch (Exception e) {
                   e.printStackTrace();
               }
           }
      }
  }
  </code></pre>
  
  <p>I managed to compile it using:</p>
  
  <pre><code>javac -classpath ~/Downloads/lwjgl-2.8.3/jar/lwjgl.jar:~/Downloads/lwjgl-2.8.3/jar/lwjgl_util.jar:~/Downloads/lwjgl-2.8.3/jar/jinput.jar HelloWorld.java
  </code></pre>
  
  <p>But now I can't run it... I tried:</p>
  
  <pre><code>java HelloWorld
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>java -Djava.library.path=~/Downloads/lwjgl-2.8.3/native/linux HelloWorld
  </code></pre>
  
  <p>But none of those works. Both of them complain that LWJGLException class definition was not found.</p>
  
  <p>I am running Linux, and I am not using an IDE such as Eclipse or Netbeans. I don't want to use one, I want to be able to run from terminal.</p>