# Tiny issues with the .deb package on Ubuntu 12.04 LTS

**URL:** <https://discuss.elastic.co/t/tiny-issues-with-the-deb-package-on-ubuntu-12-04-lts/7559>\
**Category:** Elasticsearch\
**Created:** [May 4, 2012, 7:23am UTC](https://discuss.elastic.co/t/tiny-issues-with-the-deb-package-on-ubuntu-12-04-lts/7559 "2012-05-04T07:23:54Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Dennis](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@Dennis](https://discuss.elastic.co/u/Dennis)\
**Post date:** [October 23, 2013, 12:18am UTC](https://discuss.elastic.co/t/tiny-issues-with-the-deb-package-on-ubuntu-12-04-lts/7559/21 "2013-10-23T00:18:23Z")

</div>

II would have to say , based on my look at the start up script, and tests,  
that it does NOT use $JAVA\_HOME that bash users see. You can look at the  
code yourself. Please point out to me which line in the installed  
/etc/init.d/elasticsearch bash script grabs $JAVA\_HOME. Now, I KNOW that I  
have it set, because I checked continously while trying to fix this  
problem. Tomcat actually has the EXACT same problem (at least, the latest  
tomcat7). Originally, I fixed it by going to /etc/default/tomcat7 and put a  
duplicate of $JAVA\_HOME value as I currenlty had in .bashrc file. I did the  
same thing to /etc/default/easticsearch.

But I found and easier way. It might even set $JAVA\_HOME setting in one  
place as one would hope, but I'll have to check when I next reboot.  
Put 'JAVA\_HOME="/your/java/home" into /etc/environment. (You CANNOT use  
variable expansion, i.e. JAVA\_HOME="$SOME\_OTHER\_JAVA\_HOME". Only a new  
value ) Apparently, according to this [http://askubuntu.com/a/150815/21268](http://askubuntu.com/a/150815/21268),  
it work for all the services that get launched at any time after boot..  
All the other places to set it only apply if an app is launched in a bash  
shell.

HOW exactly in the startup script elasticsearch and tomcat7 are getting the  
value of JAVA\_HOME, I have no idea. It might be one of the sourced fiiles  
early in the script. But even if it IS getting the value that way, I don't  
see a test for JAVA\_HOME that would make it skip testing all the locations  
it tests.

On Tuesday, September 18, 2012 2:58:52 AM UTC-7, kimchy wrote:

> Its actually using $JAVA\_HOME by default in the bin/elasticsearch script.  
> The deb init.d script tries to find it automatically, based on a list of  
> common locations, and if its not found, it will use the regular $JAVA\_HOME  
> one.
> 
> On Sep 16, 2012, at 5:42 PM, gearond \<[gea...@sbcglobal.net](mailto:gea...@sbcglobal.net) \<javascript:\>\>  
> wrote:
> 
> > I found the same problem using 19.7 ES on Ubuntu 10.10 ( I take my time  
> > updating, and I don't like the Unity desktop )
> > 
> > Why is ES not just using $JAVA\_HOME? Isn't that what it's for?
> > 
> > --  
> > View this message in context:  
> > [http://elasticsearch-users.115913.n3.nabble.com/Tiny-issues-with-the-deb-package-on-Ubuntu-12-04-LTS-tp3961419p4022755.html](http://elasticsearch-users.115913.n3.nabble.com/Tiny-issues-with-the-deb-package-on-Ubuntu-12-04-LTS-tp3961419p4022755.html)  
> > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > 
> > --

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:11am UTC](https://discuss.elastic.co/t/tiny-issues-with-the-deb-package-on-ubuntu-12-04-lts/7559/22 "2017-07-06T02:11:06Z")

</div>

Closed on July 6, 2017, 2:11am UTC



[Previous page](https://discuss.elastic.co/t/tiny-issues-with-the-deb-package-on-ubuntu-12-04-lts/7559.md?page=1)
