# ELASTIC SEARCH 7.9.3 not able to start on OPEN JDK

**URL:** <https://discuss.elastic.co/t/elastic-search-7-9-3-not-able-to-start-on-open-jdk/283940>\
**Category:** Elasticsearch\
**Created:** [September 11, 2021, 2:26pm UTC](https://discuss.elastic.co/t/elastic-search-7-9-3-not-able-to-start-on-open-jdk/283940 "2021-09-11T14:26:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devin](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@devin](https://discuss.elastic.co/u/devin)\
**Post date:** [September 11, 2021, 2:26pm UTC](https://discuss.elastic.co/t/elastic-search-7-9-3-not-able-to-start-on-open-jdk/283940/1 "2021-09-11T14:26:54Z")

</div>

I want to use open jdk for my elastic search rather than bundled jdk. I have set up .bash\_profile variables as below but Elastic search keeps on failing to start up with below error.PLEASE HELP !!

could not find java in JAVA\_HOME at /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7\_9.x86\_64/jre/bin/bin/java

My JAVA\_HOME variables in .bash\_profile are set as below

export JAVA\_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7\_9.x86\_64/jre/bin/bin/java  
export PATH=$JAVA\_HOME/bin:$PATH:  
export PATH

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 11, 2021, 2:40pm UTC](https://discuss.elastic.co/t/elastic-search-7-9-3-not-able-to-start-on-open-jdk/283940/2 "2021-09-11T14:40:44Z")

</div>

The path you are setting does not look correct

`... /jre/bin/bin/java`

Typically it is set to the base path of the Java install

Should probably be

`/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64`

---

<div class="post-metadata">

**Author:** ![devin](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@devin](https://discuss.elastic.co/u/devin)\
**Post date:** [September 11, 2021, 4:16pm UTC](https://discuss.elastic.co/t/elastic-search-7-9-3-not-able-to-start-on-open-jdk/283940/3 "2021-09-11T16:16:34Z")

</div>

Hi Stephen,  
Thanks for replying. Yes, I tried it setting that way as well but had no luck either. Then I removed open jdk8 and installed openjdk-11 and pointed the path same way as you described and elastic search came up. So not sure why it don’t like openjdk8.

But all is good now and running on openjdk-11

---

<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:** [October 9, 2021, 4:17pm UTC](https://discuss.elastic.co/t/elastic-search-7-9-3-not-able-to-start-on-open-jdk/283940/4 "2021-10-09T16:17:04Z")

</div>

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