Closed taimoorgit closed 3 years ago
taimoor@GAMING-PC:~/liboqs-java$ mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.10, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.72-microsoft-standard-wsl2", arch: "amd64", family: "unix"
Hi! In my system, for Java 8 JNI is located in /usr/lib/jvm/java-1.8.0-openjdk-amd64/include
and for Java 11 in /usr/lib/jvm/java-11-openjdk-amd64/include
. For instance:
❯❯ ~ ls $JAVA_HOME/include
classfile_constants.h jawt.h jdwpTransport.h jni.h jvmticmlr.h jvmti.h linux
From your logs,
taimoor@GAMING-PC:~/liboqs-java$ echo $JAVA_HOME && ls $JAVA_HOME
/usr/lib/jvm/java-1.11.0-openjdk-amd64
bin conf docs legal lib man release
it doesn't seem you have the include directory.
Can you try installing the following packages? apt install openjdk-11-jdk
, apt install openjdk-11-jre
, and apt install build-essential
I think the first one will do the work but if it doesn't, try installing the other two as well. Then check if you have the include
directory and inside the directory a jni.h
header file.
Thanks @jimouris, my issue was completely irrelevant to liboqs-java, I feel silly!
After installing the JRE in addition to the JDK I already have mvn package
works fine!
Hello,
I am trying to build the Maven package on WSL/Ubuntu. I have liboqs installed with shared libs enabled. I have installed JDK 11 and set my JAVA_HOME environment variable, but it seems like jni.h still isn't found. Is there a step I am missing that can fix this?
Thank you