Forum: JRuby Jruby development in Eclipse/PDE, targetting as RCP plugin?

7ad5f543b9592aa423771338c057d7e5?d=identicon&s=25 Gergely Nagy (Guest)
on 2014-02-05 17:14
(Received via mailing list)
Hi Community,
Anyone able to build/debug Jruby as an Eclipse plugin these days?

I've been wrapping jruby-complete.jar as an Eclipse plugin (basically an
OSGI bundle with some extra hacks - I know that jar is a bundle on its
own.),
and using it within an RCP app.

Nowadays I need debugging into Jruby core itself (eg to track down perf
issues I mentioned here http://bit.ly/1eU0UT9 ).
For this I was using Eclipse tricks to browse in the source of the
vanilla
jruby-complete.jar.. however now I want a more dynamic workflow where i
can
actually debug my changes.

I was able to compile Jruby in Eclipse so far using the M2Eclipse plugin
(noticed 2 Eclipse .project files under the tree, I picked the one under
the core).. then I was trying to convert it to a bundle/plugin project..
but this failed miserably - last one being a parse error
@version.ruby.patchlevel@, I guess this has to be replaced -- but now
i'd
like to take a step back and figure things out.

So although I've been a happy jruby user for some time, am a newbie on
internals and building stuff, especially lost with the Maven stuff..
..any pointers, hints would be gratefully received!
many thanks.
Gergo
B05d3cbc64b0031a24c2887fb6ddc173?d=identicon&s=25 christian (Guest)
on 2014-02-05 18:13
(Received via mailing list)
the src/main/java/org/jruby/runtime/Constants.java file is generated by
maven ($mvn process-resources) from the
src/main/resources/org/jruby/runtime/Constants.java

my eclipse reacts kind of strange, I generate the file $mvn
process-resources and open the eclipse editor and see the file from the
resources. I do not know why that happens.

I guess a first hack to get you running is to create a working
Constants.java with something like this:
$ mvn process-resources
$ cp src/main/java/org/jruby/runtime/Constants.java
src/main/resources/org/jruby/runtime/Constants.java

next is the lib directory from jruby/lib - an environment variable
jruby.lib= and or jruby.home will help.

if I find a better way I will let you know.

- christian
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.