[rjb-users] JRuby Compatibility?

richard apodaca rich_apodaca at yahoo.com
Tue Nov 20 20:13:14 EST 2007

Hello Arton,

That's great news - I completely missed it. I tried
the Rubyesque method names out and they seem to work
very well.

Now if we had a regular old "import" statement that
does the same thing as the JRuby import statement:

$ jirb
irb(main):001:0> import 'java.util.Vector'
=> ["java.util.Vector"]
irb(main):002:0> v=Vector.new
=> #<Java::JavaUtil::Vector:0x1cdfd19 @java_object=[]>

Between an import statement and the Rubyesque method
names, the remaining syntax differences between JRuby
and RJB/MRI would be pretty minor.

I'm not sure that's a direction you want to take RJB,
but it seems like it could really make it easy to
switch between MRI/RJB and JRuby as the need arises.


--- arton <arton at e07.itscom.net> wrote:

> Hi,
> Since Rjb-1.0.8, Rjb supports ruby style method name
> for Java objects.
> So, the main difference between Jruby and Rjb is the
> importing method
> for Java classes. (If you find more difference,
> please let me know, I'll
> fix it)
> Below is my diary (something like blog)
> http://arton.no-ip.info/diary/20070911.html#p03
> This entry was written in Japanese, but the code is
> Ruby, so I think you
> can read and understand how it works.
> Best regatds
> -- 
> arton
> _______________________________________________
> rjb-users mailing list
> rjb-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rjb-users


Richard L. Apodaca

http://depth-first.com      Blog
http://metamolecular.com    Company

More information about the rjb-users mailing list