# Is java client 7.17 compatible with elastic 8.18

**URL:** <https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194>\
**Category:** Elasticsearch\
**Created:** [December 19, 2025, 7:06am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194 "2025-12-19T07:06:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elastic04](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@Elastic04](https://discuss.elastic.co/u/Elastic04)\
**Post date:** [December 19, 2025, 7:06am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/1 "2025-12-19T07:06:33Z")

</div>

We are using Elastic stack version 8.9 currently and Java api client 7.17. we want to upgrade to 9.x. From 8.9 we are migrating to 8.18 or 8.19, then from 8.19 version to 9.x. How should we upgrade java client?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 19, 2025, 7:18am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/2 "2025-12-19T07:18:54Z")

</div>

Have you looked at [the official documentation](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/compatibility)?

The Java 7.17 client [should work with all 8.x versions](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html) as long as it is in compatibility mode, but is not guaranteed to work with Elasticsearch 9.x. I would therefore recommend following the flow in the official documentation and upgrade to Elasticsearch 8.19 before upgrading the client to the latest 8.x version as well. Once that is done you should be able to migrate to Elasticsearch 9.x as the 8.x client will work with this in compatibility mode.

---

<div class="post-metadata">

**Author:** ![Elastic04](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@Elastic04](https://discuss.elastic.co/u/Elastic04)\
**Post date:** [December 19, 2025, 7:41am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/3 "2025-12-19T07:41:18Z")

</div>

Thanks for your quick response Christian. But I see that HLRC was **deprecated** in 7.15 and **frozen** on 7.17. So, Should we upgrade server to 8.19 first and migrate java HLRC 7.17 to java API client 8.x and then upgrade server to 9.x?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 19, 2025, 7:49am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/4 "2025-12-19T07:49:54Z")

</div>

Yes, you will need to switch to the new Java client before going to Elasticsearch 9.x.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 20, 2025, 7:16pm UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/5 "2025-12-20T19:16:32Z")

</div>

Note that there are 7.17 versions of the Java API client too, e.g. [https://mvnrepository.com/artifact/co.elastic.clients/elasticsearch-java/7.17.29](https://mvnrepository.com/artifact/co.elastic.clients/elasticsearch-java/7.17.29). So another option would be to migrate your application to this client while everything is still running in 7.17, from which point the upgrades to 8.x and 9.x will be more straightforward.

Whatever you do you need to do it reasonably soon: 7.17 reaches the [end of its support term](https://www.elastic.co/support/eol) on 2026-01-15.

---

<div class="post-metadata">

**Author:** ![Elastic04](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@Elastic04](https://discuss.elastic.co/u/Elastic04)\
**Post date:** [December 30, 2025, 2:37pm UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/6 "2025-12-30T14:37:17Z")

</div>

Should we Refactor the code to Java API client first (to 7.17 or 8.x) or do the server upgrade first to 8.19.x? And is Java runtime 21 compatible with above versions?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 30, 2025, 3:04pm UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/7 "2025-12-30T15:04:07Z")

</div>

> [@Elastic04](#):
>
> Should we Refactor the code to Java API client first (to 7.17 or 8.x) or do the server upgrade first to 8.19.x?

It’s your choice. Either is ok.

> [@Elastic04](#):
>
> And is Java runtime 21 compatible with above versions?

I believe so.

---

<div class="post-metadata">

**Author:** ![Elastic04](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@Elastic04](https://discuss.elastic.co/u/Elastic04)\
**Post date:** [January 2, 2026, 6:47am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/8 "2026-01-02T06:47:59Z")

</div>

How to plan this migration in production?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 2, 2026, 7:40am UTC](https://discuss.elastic.co/t/is-java-client-7-17-compatible-with-elastic-8-18/384194/9 "2026-01-02T07:40:07Z")

</div>

Everything discussed above applies to a production deployment.
