简体   繁体   中英

mozjpeg installation problems

I need mozjpeg in my java project. I'm installing it from instruction from link: instruction

One step says that i need to run command ./configure with option --with-java. I type command like this:

./configure --with-java --includedir=/home/user/NARZEDZIA/jdk1.8.0_73/include/

(because my jni header file is in this location). I tried with source /home/user/NARZEDZIA/jdk1.8.0_73/ too but i still have the same error:

configure: error: Could not find JNI header file

Any idea how to help ./configure to find jni header file? :/

The configure script is looking for jni.h within the directory /usr/java/default/include. As a workaround, you can just create a symbolic link to the location where your jni.h is located. In my case it's located at $JAVA_HOME/include. See below, hope it helps.

mkdir -p /usr/java/default/
ln -s  $JAVA_HOME/include/ /usr/java/default/include
./configure --with-java

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