# Trying to install elasticsearch on ubuntu 12; running into JAVA\_HOME problems

**URL:** <https://discuss.elastic.co/t/trying-to-install-elasticsearch-on-ubuntu-12-running-into-java-home-problems/9078>\
**Category:** Elasticsearch\
**Created:** [September 20, 2012, 6:19pm UTC](https://discuss.elastic.co/t/trying-to-install-elasticsearch-on-ubuntu-12-running-into-java-home-problems/9078 "2012-09-20T18:19:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Edelhart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_edelhart/32/2712_2.png) [@David\_Edelhart](https://discuss.elastic.co/u/David_Edelhart)\
**Post date:** [September 20, 2012, 6:19pm UTC](https://discuss.elastic.co/t/trying-to-install-elasticsearch-on-ubuntu-12-running-into-java-home-problems/9078/1 "2012-09-20T18:19:47Z")

</div>

I am having stupid NooB problems with elasticsearch getting it going on  
ubuntu

I have followed [https://gist.github.com/2026107](https://gist.github.com/2026107) (s/19.0/19.9) and installed  
JDK 7, and setup JAVA\_HOME

however it is compaining when I try to start the service, "no JDK found -  
please set JAVA\_HOME"

yet both echo $JAVA\_HOME and sudo echo $JAVA\_HOME give me "/usr/bin/java"

Any suggestions?

--

---

<div class="post-metadata">

**Author:** ![Robin\_Verlangen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_verlangen/32/1542_2.png) [@Robin\_Verlangen](https://discuss.elastic.co/u/Robin_Verlangen)\
**Post date:** [September 20, 2012, 6:45pm UTC](https://discuss.elastic.co/t/trying-to-install-elasticsearch-on-ubuntu-12-running-into-java-home-problems/9078/2 "2012-09-20T18:45:08Z")

</div>

As far as I'm aware of the application appens "/bin/java" to the JAVA\_HOME  
path. So try setting this:

export JAVA\_HOME=/usr

Best regards,

Robin Verlangen  
_Software engineer_  
\*  
\*  
W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
E robin@us2.nl

Disclaimer: The information contained in this message and attachments is  
intended solely for the attention and use of the named addressee and may be  
confidential. If you are not the intended recipient, you are reminded that  
the information remains the property of the sender. You must not use,  
disclose, distribute, copy, print or rely on this e-mail. If you have  
received this message in error, please contact the sender immediately and  
irrevocably delete this message and any copies.

2012/9/20 David Edelhart [poppin.fressh@gmail.com](mailto:poppin.fressh@gmail.com)

> I am having stupid NooB problems with elasticsearch getting it going on  
> ubuntu
> 
> I have followed [https://gist.github.com/2026107](https://gist.github.com/2026107) (s/19.0/19.9) and  
> installed JDK 7, and setup JAVA\_HOME
> 
> however it is compaining when I try to start the service, "no JDK found -  
> please set JAVA\_HOME"
> 
> yet both echo $JAVA\_HOME and sudo echo $JAVA\_HOME give me "/usr/bin/java"
> 
> Any suggestions?
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Derry\_O\_Sullivan](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Derry\_O\_Sullivan](https://discuss.elastic.co/u/Derry_O_Sullivan)\
**Post date:** [September 25, 2012, 7:28am UTC](https://discuss.elastic.co/t/trying-to-install-elasticsearch-on-ubuntu-12-running-into-java-home-problems/9078/3 "2012-09-25T07:28:12Z")

</div>

Sometimes on ubuntu, you can run the update alternatives command to pick  
the main java executable referenced by the OS:  
[https://help.ubuntu.com/community/Java](https://help.ubuntu.com/community/Java)

I would suspect that it's still pointing to some alternative Java version  
that is not compatible...

On Thursday, 20 September 2012 19:45:11 UTC+1, Robin Verlangen wrote:

> As far as I'm aware of the application appens "/bin/java" to the JAVA\_HOME  
> path. So try setting this:
> 
> export JAVA\_HOME=/usr
> 
> Best regards,
> 
> Robin Verlangen  
> _Software engineer_  
> \*  
> \*  
> W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
> E ro...@us2.nl \<javascript:\>
> 
> Disclaimer: The information contained in this message and attachments is  
> intended solely for the attention and use of the named addressee and may be  
> confidential. If you are not the intended recipient, you are reminded that  
> the information remains the property of the sender. You must not use,  
> disclose, distribute, copy, print or rely on this e-mail. If you have  
> received this message in error, please contact the sender immediately and  
> irrevocably delete this message and any copies.
> 
> 2012/9/20 David Edelhart \<[poppin...@gmail.com](mailto:poppin...@gmail.com) \<javascript:\>\>
> 
> > I am having stupid NooB problems with elasticsearch getting it going on  
> > ubuntu
> > 
> > I have followed [https://gist.github.com/2026107](https://gist.github.com/2026107) (s/19.0/19.9) and  
> > installed JDK 7, and setup JAVA\_HOME
> > 
> > however it is compaining when I try to start the service, "no JDK found -  
> > please set JAVA\_HOME"
> > 
> > yet both echo $JAVA\_HOME and sudo echo $JAVA\_HOME give me "/usr/bin/java"
> > 
> > Any suggestions?
> > 
> > --

--

---

<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:** [July 6, 2017, 3:11am UTC](https://discuss.elastic.co/t/trying-to-install-elasticsearch-on-ubuntu-12-running-into-java-home-problems/9078/4 "2017-07-06T03:11:35Z")

</div>


