Closed marktwtn closed 5 years ago
What java version do you use would cause fail? Java 9?
What java version do you use would cause fail? Java 9?
Java 11.
So, we need a wrapper of javah for JDK versions greater than 8. @marktwtn, did you find JNI API changes so far?
I do not find other ways to use javac -h
without compiling the Java file.
To make the compilation succeed, download the source code of IRI rather than the single file PearlDiver.java
.
If the compilation does not succeed, the native header file would no be generated.
Can we simply set JAVAH
to which javah || javac -h
or something similar?
The -h
option in javac (Java11) actually means the native header file output directory path. It seems that we need entire iri
package to produce native header file orz ...
Since the native header file is dependent on the java source code, shall we provide a latest jni header file (corresponding to the latest DLTcollab/iri) online rather than built by user?
Isn't iri only compatible with Java 8 atm?
Isn't iri only compatible with Java 8 atm?
Yes, according to the readme.md
of IRI:
Make sure to have Maven and Java 8 installed on your computer.
I accidentally found out the issue while I was using the Java 11.
In the readme.md
of IRI, it says
Make sure to have Java 8 installed on your computer.
However, the Java version is not specified in the readme.md
of dcurl.
Here are the possible solutions:
readme.md
javac
to generate the JNI header file.
The Java version greater than 8 removes the tool
javah
. It usesjavac -h
to replace the same functionality ofjavah
.The
javac -h
was first implemented in the Java 8.If we use the newer version of Java, the
BUILD_JNI=1
would fail in the steps ofmk/java.mk
.