Call Ruby class over java with jruby
Posted
by r2
on Stack Overflow
See other posts from Stack Overflow
or by r2
Published on 2010-04-25T10:56:20Z
Indexed on
2010/04/25
11:03 UTC
Read the original article
Hit count: 316
Hi all
If I implement a class in ruby and compile it with jrubyc than it is not possible to call it from a java class directly if I start it with java. If I see this right I have to use
org.jruby.embed...
to implement a wrapper wich takes a class name and a metod to call my ruby class.
Do I have to do this also if I start the application with jruby? In my current project I start java workflow engine completely with jruby. The workflow has to call a method in a ruby class which he cant find.
Maybe easier to understand:
[ruby_class] <-----has to call----.
|
jruby [ruby_start_script] --starts--> [java wfe]
© Stack Overflow or respective owner