Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMagick Error when trying to load a file - UnsatisfiedLink

java.lang.UnsatisfiedLinkError: no JMagick in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1045)

when trying to use the code

ImageInfo info;

    try {
      info = new ImageInfo();
      //image = new MagickImage(info);

    } catch (MagickException e) {
      logger.error(InsightsHelper.getStackTrace(e));
    }

any ideas why this is happening? I'm using eclipse on OSX

like image 806
James Avatar asked Aug 24 '10 03:08

James


Video Answer


1 Answers

You need to add the binaries that you compiled to the path so that Eclipse can see it. First add JMagick.jar as a library, then in the the project properties-> Java Build Path -> Libraries, you click on the jmagick jar that you added to this project and edit the location for "Native library", which in this case it'll be where libJMagick-6.2.6.dylib is located since that's what the link that you provided says.

like image 131
trigoman Avatar answered Oct 21 '22 05:10

trigoman