Created
February 26, 2011 17:39
-
-
Save tychobrailleur/845416 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sebastien@greystones:/tmp$ jruby -v | |
jruby 1.6.0.RC2 (ruby 1.8.7 patchlevel 330) (2011-02-25 f7688dc) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [linux-amd64-java] | |
sebastien@greystones:/tmp$ jruby my_other_class.rb | |
hello | |
world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
java_import 'MyClass' | |
class MyOtherClass < MyClass | |
def doStuff | |
super | |
puts "world" | |
end | |
end | |
MyOtherClass.new.doStuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass { | |
public void doStuff() { | |
System.out.println("hello"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment