简体   繁体   中英

java.lang.UnsatisfiedLinkError: no JMagick in java.library.path

Has anyone used JMagick? I imported the jar using maven and got error "java.lang.UnsatisfiedLinkError: no JMagick in java.library.path". After lot of research, I found that I should set the path of libJMagick.so file in java.library.path. http://www.jmagick.org/6.4.0/ only has the sourcecode of jmagick. I tried following the instructions here ( https://gist.github.com/kei2100/4688805 ) to build jmagick. I'm stuck at below line

./configure --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/Current --with-magick-home=/usr/local/Cellar/imagemagick/6.7.1-1/

It keeps failing with error "configure: error: 'Unable to locate jni.h'" I have jni.h under my java_home/include folder. I tried passing include folder using --with-java-includes argument. But it still keeps failing. Any idea how to move forward?

As stated here , you have to specify the JDK include paths as compiler flag, eg:

./configure CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux" --with-java-home=$JAVA_HOME --with-magick-home=/usr/local/Cellar/imagemagick/6.7.1-1/

Alternatively you can also create a file named config.site and specify the compiler flags there (as stated here ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM