# Not able to run elasticsearch.bat file

**URL:** <https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045>\
**Category:** Elasticsearch\
**Created:** [February 26, 2019, 4:36pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045 "2019-02-26T16:36:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 26, 2019, 4:36pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045/1 "2019-02-26T16:36:16Z")

</div>

I am looking to run elasticsearch by running elasticsearch.bat file in bin folder  
but its throwing following error,  
**Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.**  
**Error: Could not find or load main class Kumar**  
**Caused by: java.lang.ClassNotFoundException: Kumar**

Mohan Kumar U is the user name, and i am running windows, java 11,  
I have also set JAVA\_HOME in environment variables

---

<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:** [February 26, 2019, 4:58pm UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045/2 "2019-02-26T16:58:27Z")

</div>

Which elasticsearch version is that?

I'd recommend moving elasticsearch to a directory without any space in its name.  
Not sure if that will fix the problem but worth trying.  
Same for Java.

You can also may be look at [https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html)?

---

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 27, 2019, 2:27am UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045/3 "2019-02-27T02:27:48Z")

</div>

I tried it,it still gives the same error

---

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 27, 2019, 4:09am UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045/4 "2019-02-27T04:09:41Z")

</div>

The version is 6.6.1.  
But no matter which elasticsearch version i use ,i get that error.

---

<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:** [February 27, 2019, 8:58am UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045/5 "2019-02-27T08:58:42Z")

</div>

Did you try [https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html) ?

---

<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:** [March 27, 2019, 8:58am UTC](https://discuss.elastic.co/t/not-able-to-run-elasticsearch-bat-file/170045/6 "2019-03-27T08:58:44Z")

</div>

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