简体   繁体   English

调用Ruby-> JRuby-> Java库

[英]Calling Ruby --> JRuby --> Java libraries

I have installed all 3 of Ruby, JRuby, and Java on my machine. 我已经在机器上安装了Ruby,JRuby和Java的全部3种。 The problem is that they are all living kind of separately :) 问题在于它们都是分开生活的:)

How can I, in the same application, have Ruby invoke JRuby so that it calls the Java code and gets back some values? 我如何在同一个应用程序中让Ruby调用JRuby,以便它调用Java代码并获取一些值?

Currently I am developing Ruby and deploying it to the default localhost:3000 but to call the Java classes, I probably need to consolidate all this into a Tomcat .war file. 当前,我正在开发Ruby并将其部署到默认的localhost:3000,但是要调用Java类,我可能需要将所有这些整合到Tomcat .war文件中。 In turn, the Java code is built and deployed using an ant script. 反过来,使用ant脚本构建和部署Java代码。

What is the best way for me to go about consolidating all that into one application? 将所有这些整合到一个应用程序中的最佳方式是什么?

最简单的方法是将所有内容移至JRuby,并与warbler打包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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