I installed JOGL but why wont Eclipse recognize my hello world program?

一笑奈何 提交于 2019-12-11 23:07:08

问题


i installed Jogl and included it in the build path of eclipse but it is under referenced libraries. Here is the program.

public class exceptionhandler
{ // open HelloWorld

    public static void main(String[] args)
    { // open main
        try
        { // open try
            System.loadLibrary("jogl");
            System.out.println("Hello World! (The native libraries are installed.)");
        } // close try
        catch (Exception e) // all try's need a catch
        { } // even if the catch does nothing
    } // close main

} // close HelloWorld

I did not include the import because Eclipse didn't recognize it. So when i do run it i get this>

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at exceptionhandler.main(exceptionhandler.java:8)

回答1:


Are you sure you use the latest version of JOGL? Have you downloaded the JARs containing the native libraries too? Have you put them into the same directory than jogl-all.jar and gluegen-rt.jar?




回答2:


Have you specified the path to jogl.dll in the Eclipse build-path settings?

See https://stackoverflow.com/a/958074/1216956 for instructions.



来源:https://stackoverflow.com/questions/9334203/i-installed-jogl-but-why-wont-eclipse-recognize-my-hello-world-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!