Skip to content

Instantly share code, notes, and snippets.

@headius
Created May 5, 2010 03:23
Show Gist options
  • Save headius/390342 to your computer and use it in GitHub Desktop.
Save headius/390342 to your computer and use it in GitHub Desktop.
~/projects/jruby ➔ cat blah.rb
class MyClass
def foo
puts 'hello'
end
end
~/projects/jruby ➔ jrubyc --javac blah.rb
Generating Java class MyClass to /Users/headius/projects/jruby/MyClass.java
javac -d /Users/headius/projects/jruby -cp /Users/headius/projects/jruby/lib/jruby.jar:. /Users/headius/projects/jruby/MyClass.java
~/projects/jruby ➔ javap MyClass
Compiled from "MyClass.java"
public class MyClass extends org.jruby.RubyObject{
public static org.jruby.runtime.builtin.IRubyObject __allocate__(org.jruby.Ruby, org.jruby.RubyClass);
public MyClass();
public java.lang.Object foo();
static {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment