Geo
Geo

Reputation: 96987

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.

Upvotes: 7

Views: 878

Answers (3)

Geo
Geo

Reputation: 96987

This was the solution I used : Direct JRuby embedding

Upvotes: 1

James Moore
James Moore

Reputation: 9026

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.

Upvotes: 0

digitalsanctum
digitalsanctum

Reputation: 3299

Yes it's possible. This page on the JRuby wiki should get you started.

Upvotes: 4

Related Questions