java.lang.NoClassDefFoundError in LWJGL when attempting to run in Eclipse -


so i'm moderately novice programmer, after toiling on error while, can't find solution. i'm making puzzle game, , reason, refuses run now. error:

exception in thread "main" java.lang.noclassdeffounderror: not initialize class org.lwjgl.system.library     @ org.lwjgl.system.memoryaccess.<clinit>(memoryaccess.java:22)     @ org.lwjgl.system.pointer.<clinit>(pointer.java:24)     @ org.lwjgl.glfw.glfw.<clinit>(glfw.java:594)     @ graphics.launchwindow.run(launchwindow.java:32)     @ graphics.launchwindow.main(launchwindow.java:96) 

eclipse tells me none of code has errors within it, , reinstalling lwjgl doesn't work (i tried both stable 3.0.0b build 64 , nightly 3.0.0 build 22). have seen other similar questions taking making sure lwjgl.jar in class path, i've made sure multiple times. also, if matters, have lwjgl_util.jar , slick_util.jar in class path well, , though outdated compared lwjgl 3, removing them class path makes no difference.

package graphics;  import org.lwjgl.glfw.*; import org.lwjgl.opengl.*;  import controls.keyparser; import controls.keyboardinput;  import static org.lwjgl.glfw.glfw.*; import static org.lwjgl.opengl.gl11.*; import static org.lwjgl.system.memoryutil.*;  public class launchwindow {  private glfwerrorcallback errorcallback; private glfwkeycallback   keycallback;  public int width = 1024; public int height = 600; public string title = "duplicity"; public long fullscreen = null; public long window;  public void run() {      try {         init();         loop();         glfwdestroywindow(window);         keycallback.release();     } {         glfwterminate();         errorcallback.release();     } }  private void init() {      glfwseterrorcallback(errorcallback = glfwerrorcallback.createprint(system.err));      keyboardinput.initiate();      if ( glfwinit() != glfw_true )         throw new illegalstateexception("unable initialize glfw");      if(fullscreen == null){         glfwdefaultwindowhints();         glfwwindowhint(glfw_visible, glfw_false);         glfwwindowhint(glfw_resizable, glfw_true);     }      window = glfwcreatewindow(width, height, title, fullscreen, null);     if (window == null)         throw new runtimeexception("failed create glfw window");      glfwsetkeycallback(window, keycallback = new glfwkeycallback() {         @override         public void invoke(long window, int key, int scancode, int action, int mods) {             if ( key == glfw_key_escape && action == glfw_release )                 glfwsetwindowshouldclose(window, glfw_true);         }     });      glfwvidmode vidmode = glfwgetvideomode(glfwgetprimarymonitor());     glfwsetwindowpos(window, (vidmode.width() - width) / 2, (vidmode.height() - height) / 2);     glfwmakecontextcurrent(window);     glfwswapinterval(1);     glfwshowwindow(window);      keycallback = glfwkeycallback.create(keyboardinput::glfw_key_callback);     keycallback.set(window);      /* mousebuttoncallback = glfwmousebuttoncallback.create(mouse::glfw_mouse_button_callback);     mousebuttoncallback.set(window);      cursorposcallback = glfwcursorposcallback.create(mouse::glfw_cursor_pos_callback);     cursorposcallback.set(window); */      gl.createcapabilities(); }  public void loop() {      gl.createcapabilities();     glclearcolor(0.0f, 0.0f, 0.0f, 0.0f);      while ( glfwwindowshouldclose(window) == glfw_false ) {         glclear(gl_color_buffer_bit | gl_depth_buffer_bit);         glfwswapbuffers(window);          glfwpollevents();         new keyparser().checkkeystate();     } }  public static void main(string[] args) {     new launchwindow().run(); } } 

incorrect system library path can 1 reason error, can caused system library incompatibility (on linux). code included in lwjgl 3 requires glibc version 2.14 or higher. if system (e.g. linux) older (like debian wheezy, example), glibc version older required one. if that's case you'll need install newer glibc version, or upgrade system (e.g. debian jessie). hth,

m


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -