我最近安装了ImageMagick 6.3.9和JMagick 6.3.9。从here到ImageMagick-6.3.9-0-Q8-windows-dll.exe
和jmagick-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
为什么会发生这种情况,我该如何解决?