I wonder if it is possible to use a Ruby gem in Java with JRuby. I found a lot of information on how to use Java classes in Ruby (with JRuby), but not for the other way around. What are the steps to use a Ruby library like Asciidoctor in Java? Would it be also possible to use all Python libraries in Java with Jython like DocUtils?
Asked
Active
Viewed 193 times
0
-
1I don't know about Ruby, but for Python see [this question](http://stackoverflow.com/questions/1164810/using-python-from-within-java) and others that can be found by googling "use Python library in Java". – BrenBarn Mar 06 '13 at 07:48
-
Yes you are right for Python. The linked answer-documents look quite complicated, I will spend more time on this topic. – Sonson123 Mar 06 '13 at 08:06
1 Answers
0
You may check out this link for embedding Ruby into Java. The author also explains how to call a Ruby Gem from Java.
http://javajing.com/2012/06/01/ruby-from-java.html
There are good show notes with a link to the official JRuby doc on how to run Ruby code from Java.
Personally I used only JRuby. So I do not have any idea about how to do it with Jython.

deepflame
- 928
- 1
- 8
- 19
-
Thanks, I didn't know the link. The show notes are indeed very helpful. – Sonson123 Mar 06 '13 at 08:08