title: Why does my code get a ClassNotFoundException?
body: <p>I am trying to make a window with OpenGL (using LWJGL 2) with Java. When I tried to run, a ClassNotFoundException error came up from the Eclipse 'BuiltInClassLoader'.</p>
  
  <p>I have tried using different versions of LWJGL, changed the code and put everything in one class.</p>
  
  <p>``
  DisplayManager.java (excerpt)</p>
  
  <pre><code>private static final int WIDTH = 1280;
  private static final int HEIGHT = 720;
  private static final int FPS_CAP = 60;
  private static final String TITLE = "Our First Display";
  
  
  public static void createDisplay() {
      ContextAttribs attribs = new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true);
      try {
          Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));
          Display.create(new PixelFormat(), attribs);
          Display.setTitle(TITLE);
      } catch (LWJGLException e) {
          e.printStackTrace();
      }
      GL11.glViewport(0, 0, WIDTH, HEIGHT);
  }
  
  
  public static void updateDisplay() {
      Display.sync(FPS_CAP);
      Display.update();
  }
  
  
  public static void closeDisplay() {
      Display.destroy();
  }
  </code></pre>
  
  <p>MainGameLoop.java (excerpt)</p>
  
  <pre><code>public static void main(String[] args) {
      DisplayManager.createDisplay();
  
      while (!Display.isCloseRequested()) {
  
  
          DisplayManager.updateDisplay();
      }
  
      DisplayManager.closeDisplay();
  }
  </code></pre>
  
  <p>I expected the output to show a window, this is the real output: <code>Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/glfw/GLFW
      at Main.main(Main.java:8)
  Caused by: java.lang.ClassNotFoundException: org.lwjgl.glfw.GLFW
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 1 more</code></p>