开发者

How do i call methods from JRuby into my Java code?

开发者 https://www.devze.com 2023-03-24 10:49 出处:网络
Now i have a method in my Ruby script code and basicaly its returning a variable and this variable is pretty important to my code in java, So what i whant in my java code is to call this method that i

Now i have a method in my Ruby script code and basicaly its returning a variable and this variable is pretty important to my code in java, So what i whant in my java code is to call this method that is in the Ruby script and the script returns a value and this value shall be assigned to my variable that i have..

Here is the code i have in ruby.. And i whant to call it in java and use what it returns and put it in a开发者_Python百科 variable ..

def numberMethod
  number = 3
return number
end

If you know where i can read about it or if you know how to solve it please give me a comment or answear!

Thanks!


try reading RedBridge

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号