[英]JRuby and Java objects
Please tell me if it is possible to do the following: 请告诉我是否可以执行以下操作:
May you provide a small working example? 你能提供一个小例子吗?
EDIT: It turns out that embedding was the simplest way to achieve this. 编辑:事实证明,嵌入是实现这一目标的最简单方法。 More information is available on Embedding JRuby . 有关嵌入JRuby的更多信息。
这是我使用的解决方案: 直接JRuby嵌入
It depends on what you mean by "do something". 这取决于你做什么意思“做某事”。 If you mean "redefine a method", then the answer is no, not really. 如果你的意思是“重新定义一种方法”,那么答案是否定的,不是真的。 The new method will be used by jruby, but any calls to the method in java will continue to invoke the old method. 新方法将由jruby使用,但是在java中对方法的任何调用都将继续调用旧方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.