Hello all,
I am trying to compile Apache Lucene with gradle trying to produce the jar files by running ./gradlew jar. In my custom JVM I extended the Unsafe.java library which is under jdk.unsupported. While I am trying to compile Lucene it does not use my custom JVM for the buiding of the jars files and fails. I am doing export JAVA_HOME=/path/custom/jvm but this does not work. Can you please help me?
You probably need to ask the Lucene build maintainers instead, or read their build scripts.
They could for example use the JVM toolchains feature and so JAVA_HOME is only used for running Gradle itself, but not to build or run the actual code in the project.
Hello,
1 Set JAVA_HOME:
export JAVA_HOME=/path/custom/jvm
2 Verify the path.
3 Add to gradle.properties
org.gradle.java.home=/path/custom/jvm
4 Delete .gradle folder.
5 Build:
./gradlew clean jar
I hope this will help you,
Thank you