Forum: Ruby Calling java function from JRuby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6cc7fa7c4bc582a4886a8134f2f1f8fc?d=identicon&s=25 Ahmed Abdelsalam (amabdelsalam)
on 2009-04-22 19:09
Hi,...

I'd like to call java function from inside JRuby. For example, when a
certain event happen inside JRuby script, the java function is executed.

To simplify it:
Here is some ruby code:
def handle_value(value)
   # I want to send value to the java function to handle it
end


Here is a java function
void handle_value(String value)
{
    System.out.println("value = " + value);
}


Any help please?

Regards,...

Ahmed
526d60de6472502bb570a9df2842b33b?d=identicon&s=25 Nick Sieger (Guest)
on 2009-04-22 19:44
(Received via mailing list)
On Wed, Apr 22, 2009 at 12:09 PM, Ahmed Abdelsalam <ahmed@amanzitel.com>
wrote:
>
>
> Here is a java function
> void handle_value(String value)
> {
>    System.out.println("value = " + value);
> }
>
>
> Any help please?

http://lmgtfy.com/?q=calling+java+from+jruby

Cheers,
/Nick
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-06 15:26
(Received via mailing list)
"Nick Sieger" <nicksieger@gmail.com> schrieb im Newsbeitrag

> http://  DONT_USE_THIS_LINK!!!!
> lmgtfy.com/?q=calling+java+from+jruby

Have you tried this request before posting this link here?
Did you know every Google search request wastes the same energy as an
11-watt energy saver lightbulb in an hour? Some people will have clicked
this link and watched what happens.

So you will have sent some african village into darkness.

I think lmgtfy website is really funny, but should not be used.

Michael B.
87ef5d1e14b148eb596433bc17ffe690?d=identicon&s=25 lith (Guest)
on 2009-06-06 17:00
(Received via mailing list)
> Did you know every Google search request wastes the same energy as an
> 11-watt energy saver lightbulb in an hour? Some people will have clicked
> this link and watched what happens.

Do you happen to know how much energy was wasted by my entirely
pointless reply to your insightful message?
This topic is locked and can not be replied to.