Jrubyc for jruby 1.6.1 on WinXP/Win7 totally broken

[OK, I see this is already filed as a bug here:


and I get no .java files because I defined no classes]

I have followed every possible step I can, and I simply cannot get a
jrubyc compiled class file to run with java.exe any Win box. I get the
same results for jruby 1.6.1 on both WinXP and Win7.

I also cannot get the --java option to create a .java file.

But more importantly, I cannot get the compiled class file to run. Here
is the sample command output. I really hope I’m doing something stupid.

C:\Users\jsolomon>more test.rb
require ‘java’

puts “test test”

C:\Users\jsolomon>jruby test.rb
test test

C:\Users\jsolomon>set CLASSPATH

C:\Users\jsolomon>jrubyc test.rb

C:\Users\jsolomon>ls test.*
test.class test.rb

C:\Users\jsolomon>jrubyc --java test.rb

C:\Users\jsolomon>ls test.*
test.class test.rb

C:\Users\jsolomon>java test
Exception in thread “main” java.lang.NoClassDefFoundError: test (wrong
name: ruby/jit/FILE_DFC82194F8B62BA18F33EECA0C908B0723F547D4)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: test. Program will exit.

If it helps, the compiled .class file is attached.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs