Calling java function from JRuby

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

···

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

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

Cheers,
/Nick

···

On Wed, Apr 22, 2009 at 12:09 PM, Ahmed Abdelsalam <ahmed@amanzitel.com> wrote:

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?

"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.

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?