# 7.6.0 Windows Installer MSI - Java Home Preservation

**URL:** <https://discuss.elastic.co/t/7-6-0-windows-installer-msi-java-home-preservation/221673>\
**Category:** Elasticsearch\
**Tags:** windows-installer\
**Created:** [March 2, 2020, 12:10pm UTC](https://discuss.elastic.co/t/7-6-0-windows-installer-msi-java-home-preservation/221673 "2020-03-02T12:10:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Nunn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_nunn/32/63630_2.png) [@Jason\_Nunn](https://discuss.elastic.co/u/Jason_Nunn)\
**Post date:** [March 2, 2020, 12:10pm UTC](https://discuss.elastic.co/t/7-6-0-windows-installer-msi-java-home-preservation/221673/1 "2020-03-02T12:10:05Z")

</div>

Can I suggest an improvement to the Windows MSI Installer? Now that a compatible JDK is bundled with the installer, can the location of the JDK be controlled just like the config, logs and data folders? We have our "static location" folders located at \ELASTICSEARCH\config etc and the elasticsearch binaries at \ELASTICSEARCH\7.6.0 for example. The JDK could be relocated to \ELASTICSEARCH\JDK and editing of the location allowed. This way whenever there is an update by MSI, the installer can update JDK and we do not have to manually update the Windows Environment Variables to reflect a new path to Java in JAVA\_HOME. Thanks.

---

<div class="post-metadata">

**Author:** ![Jason\_Nunn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_nunn/32/63630_2.png) [@Jason\_Nunn](https://discuss.elastic.co/u/Jason_Nunn)\
**Post date:** [March 2, 2020, 12:16pm UTC](https://discuss.elastic.co/t/7-6-0-windows-installer-msi-java-home-preservation/221673/2 "2020-03-02T12:16:52Z")

</div>

This is an update to my original post to clarify. Elasticsearch 7.6.0 on startup will look for an environment variable of JAVA\_HOME. If it finds one it will use the JDK that JAVA\_HOME points to. If JAVA\_HOME is not configured it will automatically use the bundled JDK. The MSI installer could check for JAVA\_HOME and give the option to the operator to respect the JAVA\_HOME configured JDK if present or to "lock" Elasticsearch into using its bundled JDK. May be an option to remove the JAVA\_HOME variable if no longer needed?

---

<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:** [March 30, 2020, 12:16pm UTC](https://discuss.elastic.co/t/7-6-0-windows-installer-msi-java-home-preservation/221673/3 "2020-03-30T12:16:56Z")

</div>

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