每次我运行MT4J包中的示例文件时。它不会运行并向我显示他的错误。

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: C:\Users\Umar\Downloads\MT4j\jogl.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(Unknown Source)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
    at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
    at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
    at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
    at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
    at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
    at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
    at processing.opengl.PGraphicsOpenGL.allocate(PGraphicsOpenGL.java:209)
    at processing.core.PGraphics3D.setSize(PGraphics3D.java:316)
    at processing.core.PApplet.makeGraphics(PApplet.java:1165)
    at processing.core.PApplet.size(PApplet.java:999)
    at processing.core.PApplet.size(PApplet.java:959)
    at org.mt4j.MTApplication.setup(MTApplication.java:329)
    at processing.core.PApplet.handleDraw(PApplet.java:1400)
    at processing.core.PApplet.run(PApplet.java:1328)
    at java.lang.Thread.run(Unknown Source)


有什么办法吗?

最佳答案

您尚未使用IDE正确指向库。

如果您使用的是eclipse:
在您的MT4j项目内,沿着顶部栏,单击Project-> Properties
一方是否选择Java Build Path并转到选项卡Libraries。

确保.jar文件随附的mt4j库包含在其中。特别是在mt4j-desktop / lib / jogl中找到的jogl.jar和特定于操作系统的jogl-natives-xxx。

10-08 01:53