简体   繁体   English

我安装了JOGL,但是Eclipse为什么不能识别我的hello world程序?

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

i installed Jogl and included it in the build path of eclipse but it is under referenced libraries. 我安装了Jogl并将其包含在eclipse的构建路径中,但是它在引用的库中。 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. 我没有包括导入,因为Eclipse无法识别它。 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)

Are you sure you use the latest version of JOGL? 您确定使用最新版本的JOGL吗? Have you downloaded the JARs containing the native libraries too? 您是否也下载了包含本机库的JAR? Have you put them into the same directory than jogl-all.jar and gluegen-rt.jar? 您是否将它们放在与jogl-all.jar和gumgen-rt.jar相同的目录中?

Have you specified the path to jogl.dll in the Eclipse build-path settings? 您是否在Eclipse构建路径设置中指定了jogl.dll的路径?

See https://stackoverflow.com/a/958074/1216956 for instructions. 有关说明,请参见https://stackoverflow.com/a/958074/1216956

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM