我安装JOGL,但为什么不认识我的你好世界的程序? [英] I installed JOGL but why wont Eclipse recognize my hello world program?

查看:171
本文介绍了我安装JOGL,但为什么不认识我的你好世界的程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Jogl,并将其包含在eclipse的构建路径中,但它在引用的库中。这是程序。

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

我没有包含导入,因为Eclipse没有不认识它所以当我运行它,我得到这个>

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)


推荐答案

您确定使用最新版本的JOGL吗?你是否已经下载了包含本机库的JAR?你把它们放在与jogl-all.jar和gluegen-rt.jar相同的目录下吗?

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?

这篇关于我安装JOGL,但为什么不认识我的你好世界的程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆