# Following just regular installer instructions: Error: Could not find or load main class org.jruby.Main

**URL:** <https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426>\
**Category:** Logstash\
**Created:** [January 7, 2018, 8:54pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426 "2018-01-07T20:54:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kieren\_Johnstone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kieren_johnstone/32/26311_2.png) [@Kieren\_Johnstone](https://discuss.elastic.co/u/Kieren_Johnstone)\
**Post date:** [January 7, 2018, 8:54pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426/1 "2018-01-07T20:54:12Z")

</div>

Kierens-MBP:bin kieren$ ./logstash --?

Java HotSpot(TM) 64-Bit Server VM warning: Option UseParNewGC was deprecated in version 9.0 and will likely be removed in a future release.  
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 org.jruby.Main  
Caused by: java.lang.ClassNotFoundException: org.jruby.Main

My pwd doesn't contain any colon. I literally just downloaded and unzipped the latest logstash, installed the JDK as requested, and tried to run an example.

I'm following [https://www.elastic.co/blog/getting-started-with-hosted-elasticsearch-v5-and-a-sample-dataset](https://www.elastic.co/blog/getting-started-with-hosted-elasticsearch-v5-and-a-sample-dataset), which clearly a bit dodgy since the git repo it says to use the conf from indicated that's a legacy conf.

But I'm not getting that far. Why won't a clean install of logstash run at all, please?

---

<div class="post-metadata">

**Author:** ![Kieren\_Johnstone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kieren_johnstone/32/26311_2.png) [@Kieren\_Johnstone](https://discuss.elastic.co/u/Kieren_Johnstone)\
**Post date:** [January 7, 2018, 8:56pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426/2 "2018-01-07T20:56:44Z")

</div>

Ok, some more digging, the install pages say Java 9 is not supported.

Why then does invoking Logstash and clicking "More info" take me to a page with a big fat Java 9 download button?

---

<div class="post-metadata">

**Author:** ![Kieren\_Johnstone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kieren_johnstone/32/26311_2.png) [@Kieren\_Johnstone](https://discuss.elastic.co/u/Kieren_Johnstone)\
**Post date:** [January 7, 2018, 9:02pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426/3 "2018-01-07T21:02:22Z")

</div>

Update: Java 8 fails in the same way.

---

<div class="post-metadata">

**Author:** ![Kieren\_Johnstone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kieren_johnstone/32/26311_2.png) [@Kieren\_Johnstone](https://discuss.elastic.co/u/Kieren_Johnstone)\
**Post date:** [January 7, 2018, 9:12pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426/4 "2018-01-07T21:12:23Z")

</div>

Update.. 'unzip logstash-whatever.zip' on the commandline didn't work, however if I extract the zip using OS X / Finder it's fine.

I say fine, I then get:

[FATAL] 2018-01-07 21:10:32.722 [main] runner - An unexpected error occurred! {:error=\>#\<URI::InvalidURIError: bad URI(is not URI?): file:///Users/kieren/downloads/logstash-6.1.1 2/config/log4j2.properties\>, :backtrace=\>["/Users/kieren/Downloads/logstash-6.1.1 2/vendor/jruby/lib/ruby/stdlib/uri/rfc3986\_parser.rb:67:in `split'", "/Users/kieren/Downloads/logstash-6.1.1 2/vendor/jruby/lib/ruby/stdlib/uri/rfc3986_parser.rb:73:in`parse'", "/Users/kieren/Downloads/logstash-6.1.1 2/vendor/jruby/lib/ruby/stdlib/uri/rfc3986\_parser.rb:117:in `convert_to_uri'", "/Users/kieren/Downloads/logstash-6.1.1 2/vendor/jruby/lib/ruby/stdlib/uri/rfc3986_parser.rb:88:in`join'", "/Users/kieren/Downloads/logstash-6.1.1 2/vendor/jruby/lib/ruby/stdlib/uri/common.rb:265:in `join'", "/Users/kieren/downloads/logstash-6.1.1 2/logstash-core/lib/logstash/runner.rb:234:in`execute'", "/Users/kieren/downloads/logstash-6.1.1 2/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/Users/kieren/downloads/logstash-6.1.1 2/logstash-core/lib/logstash/runner.rb:214:in`run'", "/Users/kieren/downloads/logstash-6.1.1 2/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/Users/kieren/downloads/logstash-6.1.1 2/lib/bootstrap/environment.rb:67:in`'"]}

Any tips at all?

---

<div class="post-metadata">

**Author:** ![Kieren\_Johnstone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kieren_johnstone/32/26311_2.png) [@Kieren\_Johnstone](https://discuss.elastic.co/u/Kieren_Johnstone)\
**Post date:** [January 7, 2018, 9:13pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426/5 "2018-01-07T21:13:58Z")

</div>

Is this - [https://stackoverflow.com/questions/41391781/logstash-5-1-1-bad-uriis-not-uri](https://stackoverflow.com/questions/41391781/logstash-5-1-1-bad-uriis-not-uri) - the answer?

Seriously, how frail is this thing? Why doesn't the install guide mention this, yet it mentions colons?

---

<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:** [February 4, 2018, 9:14pm UTC](https://discuss.elastic.co/t/following-just-regular-installer-instructions-error-could-not-find-or-load-main-class-org-jruby-main/114426/6 "2018-02-04T21:14:02Z")

</div>

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