# JAVA\_HOME not found when following the install directions?

**URL:** https://discuss.elastic.co/t/java-home-not-found-when-following-the-install-directions/193391
**Category:** Elasticsearch
**Created:** [August 1, 2019, 6:35pm UTC](https://discuss.elastic.co/t/java-home-not-found-when-following-the-install-directions/193391 "2019-08-01T18:35:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![antonio84](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@antonio84](https://discuss.elastic.co/u/antonio84)
#### Post date: [August 1, 2019, 6:35pm UTC](https://discuss.elastic.co/t/java-home-not-found-when-following-the-install-directions/193391/1 "2019-08-01T18:35:47Z")

</div>

CentOS 6.10 (latest)  
ES 7.3 (latest)

I'm using the link below to perform an rpm install:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html#rpm)

I followed the steps above, and tried to start elasticsearch:  
\*\*sudo -i service elasticsearch start

which: no java in (/sbin:/usr/sbin:/bin:/usr/bin)

Could not find any executable java binary. Please install java in your PATH or set JAVA\_HOME\*\*

I read that java was included in the install...is it not? Pardon my frustration but its off-putting that I can follow the direction verbatim, and not get the same results. Its not mentioned anywhere about installing java. Is there a version that comes with the rpm or no? IMO I shouldn't be stuck 5 minutes into the process when following official documentation.

---

<div class="post-metadata">

### Author: ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)
#### Post date: [August 9, 2019, 4:46pm UTC](https://discuss.elastic.co/t/java-home-not-found-when-following-the-install-directions/193391/2 "2019-08-09T16:46:09Z")

</div>

There error message you are getting looks like it is from a much older version of elasticsearch. Can you please provide the exact steps you used to install Elasticsearch? Can you verify there is not an older version on the system?

---

<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: [September 6, 2019, 4:46pm UTC](https://discuss.elastic.co/t/java-home-not-found-when-following-the-install-directions/193391/3 "2019-09-06T16:46:12Z")

</div>

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