# Could not find or load main class logstash

**URL:** <https://discuss.elastic.co/t/could-not-find-or-load-main-class-logstash/85337>\
**Category:** Logstash\
**Created:** [May 11, 2017, 6:54am UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-logstash/85337 "2017-05-11T06:54:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Nico-DF](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nico-DF](https://discuss.elastic.co/u/Nico-DF)\
**Post date:** [May 11, 2017, 8:19am UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-logstash/85337/4 "2017-05-11T08:19:24Z")

</div>

As magnus answered there:

> [@Unrecognized option: Files\\Elasticsearch\\Logstash/heapdump.hprof"](https://discuss.elastic.co/t/unrecognized-option-files-elasticsearch-logstash-heapdump-hprof/77576):
>
> Hello, I'm working to install a brand new ELK stack. Following the installation of Logstash on 2012R2, I attempted to test it with the following command: logstash -e 'input { stdin { } } output { stdout {} }' I received the following error: Unrecognized option: Files\Elasticsearch\Logstash/heapdump.hprof" JVM creation failed I have no idea where to go from here. Any help would be greatly appreciated.

And if you check a bit around, you'll see that if logstash is installed in a dir with a space: it will fail.  
So rename your folder or move logstash in other dir.

(Btw, as a linux fan, I recommend you, when you work, to never use folder with space, replace them with \_, and the same with -. It can sometime save you)

---

_[View the full topic](https://discuss.elastic.co/t/could-not-find-or-load-main-class-logstash/85337)._
