# Not able to install elasticsearch in Windows 7

**URL:** <https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 5:23am UTC](https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095 "2018-10-26T05:23:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunvinodh](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@arunvinodh](https://discuss.elastic.co/u/arunvinodh)\
**Post date:** [October 26, 2018, 5:23am UTC](https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095/1 "2018-10-26T05:23:36Z")

</div>

Hi team,  
Can you help me to resolve this error.  
C:\Users\foxin\Downloads\elasticsearch-6.4.2\elasticsearch-6.4.2\bin\>elasticsearch  
could not find java; set JAVA\_HOME or ensure java is in PATH

I have successfully set the path in environment variables as follows  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/8/68bf9bc4f9f8bf170f171ace6fb46aa814b530a1.png)

Also

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ec441dc589215b0336ed6d40e521532418ee35f5.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 26, 2018, 6:02am UTC](https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095/2 "2018-10-26T06:02:54Z")

</div>

You need to point it to the JDK directory, not it's bin directory.

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [October 26, 2018, 8:19am UTC](https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095/3 "2018-10-26T08:19:09Z")

</div>

once you set your java path,  
open command prompt, and type  
java -version  
if it is set properly, it will show the java with version number

Next Step,

1. Open command prompt
2. Navigate to the elasticsearch bin folder ex: D:\ELK\Elasticserach6.4\bin\
3. Run the command ".\elasticsearch" or ".\elasticsearch.bat"
4. Observe the output
5. Open browser and type "localhost:9200"

---

<div class="post-metadata">

**Author:** ![arunvinodh](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@arunvinodh](https://discuss.elastic.co/u/arunvinodh)\
**Post date:** [November 2, 2018, 5:02am UTC](https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095/4 "2018-11-02T05:02:51Z")

</div>

Hi @balumurari1 ,

Thanks a lot. It worked.

---

<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:** [November 30, 2018, 5:02am UTC](https://discuss.elastic.co/t/not-able-to-install-elasticsearch-in-windows-7/154095/5 "2018-11-30T05:02:56Z")

</div>

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