[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Calling java function from JRuby

Ahmed Abdelsalam

4/22/2009 5:10:00 PM

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

3 Answers

Nick Sieger

4/22/2009 5:44:00 PM

0

On Wed, Apr 22, 2009 at 12:09 PM, Ahmed Abdelsalam <ahmed@amanzitel.com> wr=
ote:
> 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)
> =A0 # I want to send value to the java function to handle it
> end
>
>
> Here is a java function
> void handle_value(String value)
> {
> =A0 =A0System.out.println("value =3D " + value);
> }
>
>
> Any help please?

http://lmgtfy.com/?q=3Dcalling+java+...

Cheers,
/Nick

Michael Bruschkewitz

6/6/2009 1:23:00 PM

0


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

-lim-

6/6/2009 3:00:00 PM

0

> 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?