Skip to content

Instantly share code, notes, and snippets.

@tychobrailleur
Created February 26, 2011 17:39
Show Gist options
  • Save tychobrailleur/845416 to your computer and use it in GitHub Desktop.
Save tychobrailleur/845416 to your computer and use it in GitHub Desktop.
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
require 'java'
java_import 'MyClass'
class MyOtherClass < MyClass
def doStuff
super
puts "world"
end
end
MyOtherClass.new.doStuff
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