I think you'll want to create the class in Java so that it's easily accessible from Java. Accessing Java classes from JRuby is pretty simple to do. Take a look here for more information:
https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby Joe On Tue, Oct 18, 2011 at 11:01 AM, Jonathan Coveney <jcove...@gmail.com>wrote: > I have a class defined in JRuby. Let's say it is called MyClass. > > My goal is to have it such that in JRuby I can do... > > m = MyClass.new > > and in java have a function > > public boolean isMyClass(Object o) { > return o instanceof MyClass > } > > What's the best way to do this? Write the class in Java? First priority is > seamlessness, but a close second is to be fast. It's not a super complicated > class, so implementing it in Java is definitely feasible, I'm just not sure > how to make it easily instantiated in both Ruby and Java. > > Thanks > Jon >