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 'elasticsearch.build']
> 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 https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 33s

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?

Thanks!


(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 http://jdk.java.net/archive/
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.