JMagick:找不到依赖的库

时间:2015-06-09 16:50:28

标签: java dll imagemagick jmagick

我最近安装了ImageMagick 6.3.9和JMagick 6.3.9。从hereImageMagick-6.3.9-0-Q8-windows-dll.exejmagick-win-6.3.9-Q8.zip

我将jmagick.jar添加到NetBeans中的项目库中,并将类路径设置为包含安装ImageMagick的文件夹(我还放置了jmagick.dll)。

这就是我所做的一切。

然而,当我运行我的程序(只声明MagickImage并初始化它)时,我收到此错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\ImageMagick-6.3.9-Q8\jmagick.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at magick.MagickLoader.<clinit>(MagickLoader.java:13)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at magick.Magick.<clinit>(Magick.java:21)
    at opengltutorials.Texture.<init>(Texture.java:36)
    at opengltutorials.Mesh.initMaterials(Mesh.java:199)
    at opengltutorials.Mesh.initFromScene(Mesh.java:148)
    at opengltutorials.Mesh.loadMesh(Mesh.java:136)
    at opengltutorials.Tutorial.init(Tutorial.java:79)
    at opengltutorials.Tutorial.main(Tutorial.java:156)
Java Result: 1

为什么会发生这种情况,我该如何解决?

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,直到我读到this blog entry说要先重新启动计算机。我做了,并且不再看错了。