Compile apache lucene with my custom jvm

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 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?

Thank you,

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.

Hi Björn, thank you for your reply. I will ask them.

1 Like

export JAVA_HOME=/path/custom/jvm
2 Verify the path.
3 Add to
4 Delete .gradle folder.
5 Build:
./gradlew clean jar
I hope this will help you,
Thank you