# Running Elasticsearch on Ubuntu - Java error

**URL:** <https://discuss.elastic.co/t/running-elasticsearch-on-ubuntu-java-error/117893>\
**Category:** Elasticsearch\
**Created:** [January 31, 2018, 8:09pm UTC](https://discuss.elastic.co/t/running-elasticsearch-on-ubuntu-java-error/117893 "2018-01-31T20:09:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geoff\_yalo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geoff_yalo/32/28323_2.png) [@geoff\_yalo](https://discuss.elastic.co/u/geoff_yalo)\
**Post date:** [January 31, 2018, 8:09pm UTC](https://discuss.elastic.co/t/running-elasticsearch-on-ubuntu-java-error/117893/1 "2018-01-31T20:09:26Z")

</div>

Hi,

I have successfully installed elasticsearch on my desktop, yet am running into issues when I try to run it. Here is what I see:

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a5b161a46824abb7c50a040e160dcdb9aa45070d.png)

Here is what I see when I run echo $JAVA\_HOME:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/5/055e1fb9869d886fdcd3b802450cec060d71f676.png)

Anyone have an idea of what to do?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2018, 9:00pm UTC](https://discuss.elastic.co/t/running-elasticsearch-on-ubuntu-java-error/117893/2 "2018-01-31T21:00:16Z")

</div>

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with `</>` icon. Check the preview window.

I think your `JAVA_HOME` is incorrectly set and does not point to a normal Java installation.

---

<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:** [February 28, 2018, 9:00pm UTC](https://discuss.elastic.co/t/running-elasticsearch-on-ubuntu-java-error/117893/3 "2018-02-28T21:00:30Z")

</div>

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