【发布时间】:2012-02-17 19:31:41
【问题描述】:
我安装了 Jogl 并将其包含在 eclipse 的构建路径中,但它位于引用的库中。这是程序。
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 无法识别它。所以当我运行它时,我得到了这个>
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)
【问题讨论】:
-
@BrianRoach 确实做了所有事情,但由于某种原因我仍然遇到同样的错误