Skip to content

Instantly share code, notes, and snippets.

@qmx
Created November 14, 2011 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qmx/1363334 to your computer and use it in GitHub Desktop.
Save qmx/1363334 to your computer and use it in GitHub Desktop.
$ 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 >
public class MyTest {
public void test(){}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment