Can JRuby invoke Java APIs?

Can JRuby invoke Java APIs?? For example, if I want to invoke Ruby
scripts from Java application. And the Ruby script will invoke Java
APIs, is it possible??
For example, Beanshell script is able to do that. Thanks.

Not sure if Ruby is a java scripting language

jrefactor@hotmail.com (John Davis) writes:

Can JRuby invoke Java APIs?? For example, if I want to invoke Ruby
scripts from Java application. And the Ruby script will invoke Java
APIs, is it possible??

Please read:

Not sure if Ruby is a java scripting language

Ruby is a language independent from Java.

Please read:

http://www.rubygarden.org/ruby?RubyFAQ and
http://www.rubygarden.org/ruby?FaqSuggestions

YS.

John Davis wrote:

Can JRuby invoke Java APIs?? For example, if I want to invoke Ruby
scripts from Java application. And the Ruby script will invoke Java
APIs, is it possible??
For example, Beanshell script is able to do that. Thanks.

Yes, invoking Java APIs is one of the main purposes for JRuby. To use
JRuby from within a Java application you can either use the Bean
Scripting Framework, or just access JRuby directly.

There are a few docs on how to access Java APIs at
http://jruby.sourceforge.net/.

Not sure if Ruby is a java scripting language

Ruby isn’t, but JRuby is. :slight_smile:

/Anders

···

A n d e r s B e n g t s s o n | ndrsbngtssn@yahoo.se
Stockholm, Sweden |


Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!