# A little confused about JAVA requirement to install ES 6.8.15 in a clean Ubuntu 18.04 server

**URL:** <https://discuss.elastic.co/t/a-little-confused-about-java-requirement-to-install-es-6-8-15-in-a-clean-ubuntu-18-04-server/273306>\
**Category:** Elasticsearch\
**Created:** [May 18, 2021, 2:45pm UTC](https://discuss.elastic.co/t/a-little-confused-about-java-requirement-to-install-es-6-8-15-in-a-clean-ubuntu-18-04-server/273306 "2021-05-18T14:45:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [May 18, 2021, 2:45pm UTC](https://discuss.elastic.co/t/a-little-confused-about-java-requirement-to-install-es-6-8-15-in-a-clean-ubuntu-18-04-server/273306/1 "2021-05-18T14:45:35Z")

</div>

I'm about to install ES 6.8.15 on a CLEAN ubuntu 18.04 server. I know I need JAVA, the question is when i stood up a clean VM with Ubuntu 18.04, It DOES NOT have any JAVA installed at all. So I'm going to have to install OpenJDK 11 onto the servers. Thats not the issue, the issue is that its confusing cause the docs say I have to set the ES\_JAVA\_HOME if I want to use a custom JAVA, I just want to install the OpenJDK and go from there. So...the question is...

Once I install OpenJDK 11, do I need to set the ES\_JAVA\_HOME var to get the ES install to work, or will just installing OpenJDK 11 be enough to get it to work.

Is there an example of how I should set ES\_JAVA\_HOME? (couldn't find it online)

---

<div class="post-metadata">

**Author:** ![cis4life](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@cis4life](https://discuss.elastic.co/u/cis4life)\
**Post date:** [May 18, 2021, 2:48pm UTC](https://discuss.elastic.co/t/a-little-confused-about-java-requirement-to-install-es-6-8-15-in-a-clean-ubuntu-18-04-server/273306/2 "2021-05-18T14:48:23Z")

</div>

Also, looking at Elastic docs it says the following...

`Elasticsearch includes a bundled version of [OpenJDK](https://openjdk.java.net/) from the JDK maintainers (GPLv2+CE). To use your own version of Java, see the [JVM version requirements](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/setup.html#jvm-version)`

What does that mean? Does that relate with ES 6.8.15? Do I even have to install JAVA if when I install ES it comes with a bundled version of ES?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 19, 2021, 1:11am UTC](https://discuss.elastic.co/t/a-little-confused-about-java-requirement-to-install-es-6-8-15-in-a-clean-ubuntu-18-04-server/273306/3 "2021-05-19T01:11:45Z")

</div>

Elasticsearch comes with a bundled JVM that you can use. If your OS doesn't have one then you will need to follow the JVM instructions on getting it installed there.

> [@cis4life](#):
>
> Once I install OpenJDK 11, do I need to set the ES\_JAVA\_HOME var to get the ES install to work, or will just installing OpenJDK 11 be enough to get it to work.

It _should_ work, yes. Elasticsearch will stop using `JAVA_HOME` in future versions, which is why you will get a deprecation logged and we recommend using `ES_JAVA_HOME` to be explicit.

---

<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:** [June 16, 2021, 1:12am UTC](https://discuss.elastic.co/t/a-little-confused-about-java-requirement-to-install-es-6-8-15-in-a-clean-ubuntu-18-04-server/273306/4 "2021-06-16T01:12:09Z")

</div>

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