I am having some trouble setting up my environment in Eclipse for ImageMagick via JMagick in OS X. I have no problems using the ImageMagick command line tools (display, convert, etc.) after installing, but am unable to set up JMagick with a Java project in Eclipse.
Steps taken:
- Downloaded JMagick 6.4.0
- Generated jar and libs through make process in the INSTALL document
- Copied libJMagick.so and libJMagick-6.4.0.so from lib to /usr/lib/java
- Added JMagick.jar to build path
- Linked /usr/lib/java directory to JMagick.jar native source, recommended in the solution posted by trigoman at the following url: JMagick Error when trying to load a file - UnsatisfiedLink
- Created sample class that accesses JMagick and attempted to run in Eclipse. Exception reported:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no JMagick in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at example.ImageRender.main(ImageRender.java:10)
Does anyone have any ideas what might be the underlying problem is?
edit: see my comment below about using im4java instead of JMagick.
I was having the same problem, but just got it working by following these sparse instructions: http://wesleyli.blog.com/2011/09/01/install-jmagick-on-mac/
But note there's a couple typos; looks like Lion auto-correct problems. So what I did was:
And now it works for me. :)