So I came up with the general idea to write some code in JRuby, then access all the classes via Java. I have no idea if this is at all possible but I wanted to ask anyway. Lets say I have some JRuby code:
class adder
def addme
return 22
end
end
If I compiled this with jrubyc is there any way I could then possibly do something like this in java:
import adder;
class anything {
void testMethod()
{
adder a = new adder();
int x = a.addme();
}
}
After looking at it now it sort of makes me think that Java will have zero idea what sort of item test addme is going to return so that might not work. I don't know but I wanted to throw it out there anyway.
Thanks