I have been programming for a while with Ruby and I really enjoy it. Lately I started having the need of compiling some ruby code. For several reasons using Ruby2exe is not
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.