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.
Ahmed A. (Guest)
on 2009-04-22 21: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
Nick S. (Guest)
on 2009-04-22 21:44
(Received via mailing list)
On Wed, Apr 22, 2009 at 12:09 PM, Ahmed A. 
<removed_email_address@domain.invalid>
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
Michael Bruschkewitz (Guest)
on 2009-06-06 17:26
(Received via mailing list)
"Nick S." <removed_email_address@domain.invalid> 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.
lith (Guest)
on 2009-06-06 19: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.