# Elasticsearch could not find Java and now won't start

**URL:** <https://discuss.elastic.co/t/elasticsearch-could-not-find-java-and-now-wont-start/173973>\
**Category:** Elasticsearch\
**Created:** [March 26, 2019, 5:03pm UTC](https://discuss.elastic.co/t/elasticsearch-could-not-find-java-and-now-wont-start/173973 "2019-03-26T17:03:24Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Simon\_Shrestha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simon_shrestha/32/43588_2.png) [@Simon\_Shrestha](https://discuss.elastic.co/u/Simon_Shrestha)\
**Post date:** [April 6, 2019, 5:57am UTC](https://discuss.elastic.co/t/elasticsearch-could-not-find-java-and-now-wont-start/173973/16 "2019-04-06T05:57:19Z")

</div>

I also did a fresh install of elastic search and got the issue below:

simon@simon:~/Downloads$ sudo dpkg -i elasticsearch-6.7.1.deb  
[sudo] password for simon:  
Selecting previously unselected package elasticsearch.  
(Reading database ... 175469 files and directories currently installed.)  
Preparing to unpack elasticsearch-6.7.1.deb ...  
/usr/bin/java  
Creating elasticsearch group... OK  
Creating elasticsearch user... OK  
Unpacking elasticsearch (6.7.1) ...  
Setting up elasticsearch (6.7.1) ...  
warning: Falling back to java on path. This behavior is deprecated. Specify JAVA\_HOME  
Created elasticsearch keystore in /etc/elasticsearch  
Processing triggers for systemd (237-3ubuntu10.15) ...  
Processing triggers for ureadahead (0.100.0-20) ...

simon@simon:~/Downloads$ echo $JAVA\_HOME  
/usr/lib/jvm/java-11-openjdk-amd64/bin/

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-could-not-find-java-and-now-wont-start/173973)._
