java - How to Fix Library Fail to Load Error on Eclipse? -


i starting learn how use lwjgl. looked on youtube , copied few lines of code down. when compiled it, worked, when tried run it, said:

[lwjgl] failed load library. possible solutions:     a) add directory contains shared library -djava.library.path or -dorg.lwjgl.librarypath.     b) add jar contains shared library classpath. [lwjgl] enable debug mode -dorg.lwjgl.util.debug=true better diagnostics. [lwjgl] enable sharedlibraryloader debug mode -dorg.lwjgl.util.debugloader=true better diagnostics. exception in thread "main" java.lang.unsatisfiedlinkerror: failed locate library: liblwjgl32.so     @ org.lwjgl.system.library.loadsystem(library.java:146)     @ org.lwjgl.system.library.loadsystem(library.java:66)     @ org.lwjgl.system.library.<clinit>(library.java:49)     @ org.lwjgl.system.memoryaccessjni.<clinit>(memoryaccessjni.java:13)     @ org.lwjgl.system.pointer.<clinit>(pointer.java:22)     @ org.lwjgl.system.platform.maplibrarynamebundled(platform.java:80)     @ org.lwjgl.glfw.glfw.<clinit>(glfw.java:602)     @ main.main(main.java:6) 

this code copied youtube:

import static org.lwjgl.glfw.glfw.*; import org.lwjgl.glfw.glfwvidmode;  public class main {     public static void main (string[] args) {         if (!glfwinit()) {             throw new illegalstateexception("failed initialize glfw!");         }         glfwwindowhint(glfw_visible,glfw_false);         long window = glfwcreatewindow(640, 480, "my program", 0, 0);         if (window == 0) {             throw new illegalstateexception("failed create window!");         }         glfwvidmode videomode = glfwgetvideomode(glfwgetprimarymonitor());         glfwsetwindowpos(window, (videomode.width() - 640) / 2, (videomode.height() - 480) / 2);         glfwshowwindow(window);         while (!glfwwindowshouldclose(window)) {             glfwpollevents();         }     } } 

this error because doesn't have dependencies in classpath. need add lwjgl jar , dependencies.

try again after overcome error (unsatisfiedlinkerror).


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -