# Not able to start to logstash due could not find main class Xmx1024m

**URL:** <https://discuss.elastic.co/t/not-able-to-start-to-logstash-due-could-not-find-main-class-xmx1024m/257638>\
**Category:** Logstash\
**Created:** [December 4, 2020, 9:23am UTC](https://discuss.elastic.co/t/not-able-to-start-to-logstash-due-could-not-find-main-class-xmx1024m/257638 "2020-12-04T09:23:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siva\_Munnaluri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siva_munnaluri/32/80261_2.png) [@Siva\_Munnaluri](https://discuss.elastic.co/u/Siva_Munnaluri)\
**Post date:** [December 4, 2020, 9:23am UTC](https://discuss.elastic.co/t/not-able-to-start-to-logstash-due-could-not-find-main-class-xmx1024m/257638/1 "2020-12-04T09:23:04Z")

</div>

Getting error as "Error: Could not find or load main class Xmx1024m" when we command "logstash.bat -e 'input {stdin{}} output {stdout{}}'"

Logstash version : 7.6.2  
Java version : Java 8.0

Please help me on this .

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 4, 2020, 2:47pm UTC](https://discuss.elastic.co/t/not-able-to-start-to-logstash-due-could-not-find-main-class-xmx1024m/257638/2 "2020-12-04T14:47:59Z")

</div>

Sounds like you are missing a leading - for one of the lines in /etc/logstash/jvm.options

---

<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:** [January 1, 2021, 2:48pm UTC](https://discuss.elastic.co/t/not-able-to-start-to-logstash-due-could-not-find-main-class-xmx1024m/257638/3 "2021-01-01T14:48:06Z")

</div>

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