Forum: JRuby JRuby and Eclipse

415f33edd5f49002806befe2192f9aca?d=identicon&s=25 Joel Sindler (synl)
on 2014-04-06 13:56
Hey guys, I recently tried to use JRuby with eclipse (with Dynamic
Language Toolkit) but I am a bit confused how to use JRuby with Java.
How do I organize my projects? Apparently I can't have JRuby script
files in Java Projects and vice versa. Do I need to store them in
separate projects and how can I efficiently work with both languages? I
am trying to learn how to use JRuby with Java and call methods from Java
in Ruby.

I know these are easy questions for users who work with JRuby regularly
but I am still quite new to java and completely new to Ruby, so I am
very grateful for general tips, links and advice.

Thanks for the help. :)
54147c1a1223b425d4f4f7947c9bba46?d=identicon&s=25 Ariel Valentin (Guest)
on 2014-04-06 14:08
(Received via mailing list)
Joel,

Would you mind sharing the motivations behind invoking Ruby from Java as
opposed to the other way around?

With respect to project structure I feel like multi-module projects make
sense to me, but I don't use Eclipse so I don't know if that is
possible: e.g.
project -
-+ module1-jruby
-+ module2-java
project-files (makefile,build.xml,pom.xml)

Thanks,
Ariel
---
Sent from my mobile device. Please excuse any errors.
415f33edd5f49002806befe2192f9aca?d=identicon&s=25 Joel Sindler (synl)
on 2014-04-06 20:16
Actually I wanted to make an UI in java and use ruby scripts from the UI
and therefore invoking ruby from java. I am not particularly shure what
I will do with that later, for now I am trying to learn to script and to
use the scripts in java. I thought about doing smaller statistical
calculations or mathematical modelling, usin fisher equations and
similar methods.

In eclipse, do I need to import the ruby folder as a library?
Apparently I can't add have a ruby module and java in the same project
and I don't know what I should do with this.
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.