[Java] Is the version of Elasticsearch you are using now compatible with Java 11?

1 minute read

It is a story. No, the release of JDK11 (OpenJDK) was September and 2018, two years ago, which is obvious! You might think that, This may not be the case for some products (in fact, AWS Elastic Beantalk was fully Java 11 compliant (GA) in April 2020-about five months before this article was written in September 2020. It was recently), so I checked it out just in case.

The beginning of things

The following page of the official website was the beginning of the matter

  • [Compatibility elastic](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html)

The Java High Level REST Client requires Java 1.8 and depends on the Elasticsearch core project.

Nana? Java 1.8…? Since the environment I am running now is Java 11, I was honestly impatient. If you read this page further,

The 6.0 client is able to communicate with any 6.x Elasticsearch node, while the 6.1 client is for sure able to communicate with 6.1, 6.2 and any later 6.x version, ・・・

It was possible to read that the version is around 6.0 to 6.2. Since the version of Elasticsearch currently used is 7.4.2 (the latest version when using Elasticsearch Service of AWS: 7.7 from 2020/07/23 to 7.7), it may be Java 11 compatible? ..


The following article arrived first.

  • [Support for Java 11 elastic](https://discuss.elastic.co/t/support-for-java-11/149393)

Currently, under test, target. The contents are as of September 2018, but I’d like to think that it is okay.

I will continue until I can confirm it.

Further investigation,

  • [Elastic Stack 6.5.0 release elastic](https://www.elastic.co/jp/blog/elastic-stack-6-5-0-released)

From this, it was confirmed that Java 11 support has been added since November 2018 version 6.5.0. (And thankfully Japanese.) We were dealing with it quite early. Wow!

I was a little worried about “from Oracle”, but it is certain that the current version of Elasticsearch (7.4.2) that I am using is compatible with Java 11, so one case is settled ~ !


The conclusion is that Elasticsearch 6.5.0 or later supports Java 11. If you are using an older version and are using the Java 11 environment, or if you are considering migration, it is better to consider upgrading to 6.5.0 or higher.


Although not mentioned in the text, these are the pages that I referred to.

  • (Corretto on Amazon Linux 2 platform(aws / elastic-beanstalk-roadmap) | GitHub](https://github.com/aws/elastic-beanstalk-roadmap/issues/1)
  • [Java SE platform history aws](https://docs.amazonaws.cn/en_us/elasticbeanstalk/latest/platforms/platform-history-javase.html)
  • [Amazon Elasticsearch Service Document History aws](https://docs.aws.amazon.com/ja_jp/elasticsearch-service/latest/developerguide/release-notes.html)