public
Created

  • Download Gist
MyTest.java
Java
1 2 3
public class MyTest {
public void test(){}
}
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9
$ javac MyTest.java
$ jruby -S irb
ruby-1.8.7-p352 :001 > require 'java'
=> true
ruby-1.8.7-p352 :002 > java_import 'MyTest'
=> Java::Default::MyTest
ruby-1.8.7-p352 :003 > MyTest.new
=> #<Java::Default::MyTest:0xc07bacb>
ruby-1.8.7-p352 :004 >

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.