简体   繁体   中英

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

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

尝试阅读RedBridge

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM