[HELP ] Call java code / method from Ruby programming

28 views
Skip to first unread message

Muthu Selvan

unread,
Jun 20, 2013, 11:04:13 PM6/20/13
to rubyonra...@googlegroups.com


 Hi All ,

  I have written java code ( This java code will not return any thing but it will do action ) which is required call from ruby , please let me what is best way to achieve this ?

  Thanks ,
  Muthu Selvan SR

Colin Law

unread,
Jun 21, 2013, 3:36:33 AM6/21/13
to rubyonra...@googlegroups.com
On 21 June 2013 04:04, Muthu Selvan <pearl....@gmail.com> wrote:
>
>
> Hi All ,
>
> I have written java code ( This java code will not return any thing but it
> will do action ) which is required call from ruby , please let me what is
> best way to achieve this ?

You can use the ruby system method to run a command, which can be any
language of course. Or you can use the backtick syntax.

Colin

Robert Walker

unread,
Jun 21, 2013, 10:23:57 AM6/21/13
to rubyonra...@googlegroups.com
Colin Law wrote in post #1113075:
You might also take a look at this:

http://rjb.rubyforge.org

--
Posted via http://www.ruby-forum.com/.

Jordon Bedwell

unread,
Jun 21, 2013, 10:28:08 AM6/21/13
to rubyonra...@googlegroups.com
Did we all seem to forget there is something called jRuby?
https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby
Reply all
Reply to author
Forward
0 new messages