How to change JDK on Elasticsearch 8.x — Windows version
For the last few days, I have been challenged by customers to change the Elasticsearch bundle JDK to Eclipse Temurin.
I’ve searched and googled around. There are no specific steps that can be followed. Most of the online articles happen on Linux, however I was looking for, windows OS.
For the above reason, I am creating this articles hoping that others that having the same issue with me can value this articles and follow thru.
- Download the Temurin on https://adoptium.net/en-GB/temurin/, suggestion to download the LTS.
- Install it to any location that you want to place it. In my case I was install on C:\Program Files\Eclipse Adoptium\jdk-17.0.5.8-hotspot\
- Add JDK on the Windows Environment Variables, add ES_JAVA_HOME and set the temurin location path, then logoff from windows and login again to have immediate effects.
- Verify the settings using Windows Command Prompt by typing echo %ES_JAVA_HOME% the capture should be shown as below.


Once the temurin setup is completed and verified, next we need to test and ensure with Elasticsearch. In this article I was using version 8.5.0.

If you see the red box on the capture, meaning your JDK has been successfully changed.
Feel free to ask me anything if you have any questions on Elasticsearch.