简体   繁体   English

mozjpeg安装问题

[英]mozjpeg installation problems

I need mozjpeg in my java project. 我的Java项目中需要mozjpeg。 I'm installing it from instruction from link: instruction 我正在从链接的指令安装它: 指令

One step says that i need to run command ./configure with option --with-java. 一步说,我需要使用--with-java选项运行命令./configure。 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). (因为我的jni头文件位于此位置)。 I tried with source /home/user/NARZEDZIA/jdk1.8.0_73/ too but i still have the same error: 我也尝试使用源/home/user/NARZEDZIA/jdk1.8.0_73/,但是我仍然遇到相同的错误:

configure: error: Could not find JNI header file 配置:错误:找不到JNI头文件

Any idea how to help ./configure to find jni header file? 任何想法如何帮助./configure查找jni头文件? :/ :/

The configure script is looking for jni.h within the directory /usr/java/default/include. 配置脚本正在/ usr / java / default / include目录中寻找jni.h。 As a workaround, you can just create a symbolic link to the location where your jni.h is located. 解决方法是,您可以仅创建一个指向jni.h所在位置的符号链接。 In my case it's located at $JAVA_HOME/include. 就我而言,它位于$ 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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