logo       

[jruby-user] Classpath in JRuby: msg#00210

lang.jruby.user

Subject: [jruby-user] Classpath in JRuby

Hi,
 
I am running some TestUnit testcases to exercise remote Java apis with JRuby and it's all working great.  One thing that I have to do to run these tests is include some specific jars on the classpath.  I've found that I can construct the classpath manually, but I wanted to see if there was a more elegant solution.  I also know I can use the JRUBY_HOME/lib dir, but i'd rather not pollute it with these jars, as they will change over time as the code is developed.
 
What i was hoping (which is probably impossible) was that I could do something like this:
 
Dir['jars/*.jar'].each {|x| require x}
 
The above obviously doesn't work, but I thought it sure looked nice  :)
 
Are there any elegant solutions that are available that I am missing?
 
Thanks in advance,
Jason 
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise