# Could not find or load main class org.logstash.Logstash

**URL:** <https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-logstash-logstash/155229>\
**Category:** Logstash\
**Created:** [November 2, 2018, 7:04pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-logstash-logstash/155229 "2018-11-02T19:04:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![telebh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/telebh/32/42272_2.png) [@telebh](https://discuss.elastic.co/u/telebh)\
**Post date:** [November 2, 2018, 7:04pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-logstash-logstash/155229/1 "2018-11-02T19:04:02Z")

</div>

Hi there,

I am newbie to Logstash and would need your help. I have JAVA version "1.8.0\_191" and installed logstash zip file for windows "logstash-6.4.2", and have a simple config file as follows, but it always raises error "Error: Could not find or load main class org.logstash.Logstash". any idea what is wrong here?

''''  
input {  
file  
{  
path =\> "C:/users/acct/desktop/20184501.txt"  
start\_position =\> "beginning"  
}  
}

filter  
{  
#if [path] =~ "201845"  
grok  
{  
match =\> ["message", "(? ._records was loaded into the temp table)"]  
 #match =\> ["message", "(? Output Filename_)"]  
match =\> [ "message", "^%{GREEDYDATA} (%{WORD:Output Filename}(.)?)$"  
]  
}  
if "\_grokparsefailure" in [tags]  
{  
drop{}  
}  
#if [path] =~ "Total counts for this file is"  
#{  
# mutate { add\_tag =\> "[path]"}  
#}  
}  
output {  
file  
{  
path =\> "C:/users/acct/desktop/logstash-20184501.txt"  
}  
stdout { codec =\> json }  
}  
'''''

> Blockquote

---

<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, 7:04pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-logstash-logstash/155229/2 "2018-11-30T19:04:07Z")

</div>

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