Tim Chen
unread,Feb 15, 2011, 1:51:28 AM2/15/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to d...@jruby.codehaus.org
Hi all,
I'm currently trying to use JRuby to launch our Java application, and I'm currently just calling the command line jruby with all the dependencies passed in as classpath and launching it in a Ruby script.
ex: jruby -J-cp xxxxx/.jar:xxxxxx.jar run.rb
The problem is that part of our app downloads yaml files and deserializes it to objects based on the type specified in each field, and it calls Class.forName('org.my.class') to
try to get the class and call its constructor.
However, calling the java app from JRuby gives NoClassFound when calling Class.forName, even though the class is in one of the jar files passed in the classpath.
I wonder what's the way to get the class loader to able to find that class?
Thanks,
Tim