Jrubyc on windows does not produce .class file


This is my first post. I’m a JRuby newbie.

I seem to be having a problem compiling ruby code on a Windows 7 (x86)
machine. I have the latest Java, and I installed the latest JRuby. When
try to compile the “simple_class.rb” file from the samples directory, I
get the .java file. If I then explicitly try to compile the .java file
javac, I get an exception stating that “package org.ruby does not
exist”. I
must have overlooked something simple, but what. I did the same thing on
Ubuntu machine, and it worked. Here are the details.

java -version
java version “1.6.0_23”
Java™ SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot™ Client VM (build 19.0-b09, mixed mode, sharing)

javac -version
javac 1.6.0_23

jruby --version
jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (Java
HotSpot™ Client VM 1.6.0_23) [x86-java]

jrubyc --javac simple_class.rb
Generating Java class SimpleRubyClass to
javac -d C:/Users/esumbar/Documents/JRubyTests -cp
:. C:/Users/esumbar/Documents/JRubyTests/SimpleRubyClass.java

Produces “SimpleRubyClass.java” only. (BTW, the path to jruby.jar has
directory separators.)

javac -d . -cp c:\jruby-1.5.6\lib\jruby.jar:. SimpleRubyClass.java
SimpleRubyClass.java:3: package org.jruby does not exist
import org.jruby.Ruby;
SimpleRubyClass.java:4: package org.jruby does not exist
import org.jruby.RubyObject;
SimpleRubyClass.java:5: package org.jruby.javasupport.util does not
import org.jruby.javasupport.util.RuntimeHelpers;