Created
December 11, 2014 20:02
-
-
Save anonymous/2da6d498146066c65d4b to your computer and use it in GitHub Desktop.
JRuby become_java! ignoring java_package
This file contains 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 'jruby/core_ext' | |
require 'java' | |
java_package 'rxtest.foobar' | |
class Foo | |
print "Heigh-ho!\n" | |
def bar() | |
puts "Called." | |
end | |
end | |
Foo.become_java!("") | |
# Output | |
# % javap -classpath . rubyobj.Foo | |
# public class rubyobj.Foo extends org.jruby.RubyObject implements org.jruby.java.codegen.Reified { | |
# public static void clinit(org.jruby.Ruby, org.jruby.RubyClass); | |
# public rubyobj.Foo(org.jruby.Ruby, org.jruby.RubyClass); | |
# public rubyobj.Foo(); | |
# public org.jruby.runtime.builtin.IRubyObject bar(); | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment