简体   繁体   中英

JRuby fresh install on Windows 10 - Could not find or load main class org.jruby.Main

jruby -v is returning Error: Could not find or load main class org.jruby.Main

I downloaded jruby-dist-9.1.12.0-src.zip from the JRuby website and then extracted its contents into C:\\jruby-9.1.12.0 .

Then I added its bin folder to the "path" variable using setx path "%path%;C:\\jruby-9.1.12.0\\bin" . The command echo %PATH% returns C:\\jruby-9.1.12.0\\bin as one of the entries.

I have even set a couple environment variables. set | findstr JRUBY_HOME set | findstr JRUBY_HOME returns JRUBY_HOME=C:\\jruby-9.1.12.0 , and set | findstr JAVA_HOME set | findstr JAVA_HOME returns JAVA_HOME=C:\\Program Files\\Java\\jre8 .

What am I missing? Did I download the wrong JRuby?

TLDR use the bin download; NOT the src download.

I got it to work by removing the contents in C:\\jruby-9.1.12.0 (which came from jruby-dist-9.1.12.0-src.zip ). Then I downloaded jruby-bin-9.1.12.0.zip and extracted its contents into C:\\jruby-9.1.12.0 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM