Java 9 Dependency

(Albendz) #1

I am trying to set up my development environment to contribute to Elasticsearch. I have forked the repo, cloned it to my machine, and have run the 'idea' target with gradle. When I run './gradlew clean build' I see this message:

FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\alici\IdeaProjects\elasticsearch\benchmarks\build.gradle' line: 31

* What went wrong:
A problem occurred evaluating project ':benchmarks'.
> Failed to apply plugin [id '']
> the environment variable JAVA9_HOME must be set to a JDK installation directory for Java 1.9 but is 
[C:\Program Files\Java\jdk-10.0.1] corresponding to [1.10]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log 
output. Run with --scan to get full insights.

* Get more help at

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.


I have set the JAVA9_HOME to where Java 10 is installed intentionally to see if I could get around this error but it will still ask for Java 9. My problem is that I'm unable to download Java 9 from Oracle without creating an account with them. Can someone recommend the version of JDK 9 that they are using for this project or a way to use only Java 10 instead of additionally installing Java 9?


(David Pilato) #2

I'm using sdkman to switch between java versions and found that very handy.

(Tim Vernum) #3

You can download an OpenJDK build from here
I believe that should work fine for building Elasticsearch.

Alternatively, my recollection is that the Oracle account is a fairly easy process (and free), if you want their builds.

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.