Compile jruby “Hello world” problem

一曲冷凌霜 提交于 2019-11-30 04:04:08

Assuming you are on windows, I think your -cp arg is wrong: it should be semi-colon delimited:

java -cp .;c:\jruby\lib\jruby.jar script

But also, I had better luck by setting the CLASSPATH env separately, e.g.:


C:\ruby>set CLASSPATH=c:\Program Files\jruby-1.4.0\lib\jruby.jar;

C:\ruby>java hello_world
Hello, world!

But perhaps that's because my classpath needs a space in it.

What version of JRuby are you using? As you can see, I'm on 1.4.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!