# Got error when run simple config file first time

**URL:** <https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795>\
**Category:** Logstash\
**Created:** [June 17, 2017, 5:58am UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795 "2017-06-17T05:58:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tals](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tals](https://discuss.elastic.co/u/Tals)\
**Post date:** [June 17, 2017, 5:58am UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795/1 "2017-06-17T05:58:36Z")

</div>

Just install local host Logstash 5.4.1  
I ceated the simple config file at the Logstash folder and run  
c:\logstash-5.4.1\bin\>logstash -f logstash-simple.conf  
and got this:  
Using JAVA\_HOME=C:\ProgramData\Oracle\Java\javapath\java.exe retrieved from PATH  
Cannot locate Java installation, specified by JAVA\_HOME:  
C:\ProgramData\Oracle\Java\javapath\java.exe

Why? What should I do?

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [June 17, 2017, 6:05pm UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795/2 "2017-06-17T18:05:40Z")

</div>

It is because JAVA\_HOME environment is referring to invalid/unknown Java installation. Generally it is installed in "C:\Program Files\Java".

I recommend that you check this directory for any valid JDK/JRE (if there is none, then you need to install one) and lastly update JAVA\_HOME with this valid installation path.

---

<div class="post-metadata">

**Author:** ![Tals](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tals](https://discuss.elastic.co/u/Tals)\
**Post date:** [June 18, 2017, 10:12am UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795/3 "2017-06-18T10:12:23Z")

</div>

Hi Thiago  
Thanks  
Can you please refer me to the download site of Java\_Home environment?  
Tal

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 19, 2017, 3:29am UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795/4 "2017-06-19T03:29:20Z")

</div>

JAVA\_HOME shouldn't point to the java.exe executable but to the root of the installation directory (the one containing directories like bin and lib).

---

<div class="post-metadata">

**Author:** ![Tals](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tals](https://discuss.elastic.co/u/Tals)\
**Post date:** [June 19, 2017, 4:44am UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795/5 "2017-06-19T04:44:58Z")

</div>

Got it  
Thanks

Tal Shainfeld  
Manager | Deloitte Analytics  
Brightman Almagor Zohar  
Deloitte, 1 Azrieli Center, Tel Aviv, 67021, Israel  
Mobile: +972 (52) 5954924  
[tshainfeld@deloitte.co.il](mailto:tshainfeld@deloitte.co.il) | [www.deloitte.co.il](http://www.deloitte.co.il)

---

<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 17, 2017, 4:45am UTC](https://discuss.elastic.co/t/got-error-when-run-simple-config-file-first-time/89795/6 "2017-07-17T04:45:25Z")

</div>

Closed on July 17, 2017, 4:45am UTC

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