# Can not build source code without suitable jdk

**URL:** <https://discuss.elastic.co/t/can-not-build-source-code-without-suitable-jdk/208325>\
**Category:** Elasticsearch\
**Created:** [November 18, 2019, 2:10pm UTC](https://discuss.elastic.co/t/can-not-build-source-code-without-suitable-jdk/208325 "2019-11-18T14:10:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonJay](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JasonJay](https://discuss.elastic.co/u/JasonJay)\
**Post date:** [November 18, 2019, 2:10pm UTC](https://discuss.elastic.co/t/can-not-build-source-code-without-suitable-jdk/208325/1 "2019-11-18T14:10:20Z")

</div>

ES 7.2  
jdk 11  
command: ./gradlew assemble  
os: macOS

**error message**  
`the compiler java.home must be set to a JDK installation directory for Java 12 but is [/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home] corresponding to [11]`

then i looked for jdk12  
but jdk12 has reached end of support. here is the link  
[https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html](https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html)

then i installed jdk 13. The result was entirely predictable  
`java.lang.IllegalArgumentException: Unsupported class file major version 57`

my question is how can i build the source code now?

---

<div class="post-metadata">

**Author:** ![JasonJay](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JasonJay](https://discuss.elastic.co/u/JasonJay)\
**Post date:** [November 19, 2019, 6:48am UTC](https://discuss.elastic.co/t/can-not-build-source-code-without-suitable-jdk/208325/2 "2019-11-19T06:48:36Z")

</div>

@dadoonet @cufflinks can you give me some help?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 19, 2019, 8:16am UTC](https://discuss.elastic.co/t/can-not-build-source-code-without-suitable-jdk/208325/3 "2019-11-19T08:16:38Z")

</div>

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

I don't have the answer as I did not build elasticsearch recently. Someone from elasticsearch dev team might be able to answer hopefully.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 17, 2019, 8:28am UTC](https://discuss.elastic.co/t/can-not-build-source-code-without-suitable-jdk/208325/4 "2019-12-17T08:28:31Z")

</div>

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