I’m having trouble trying to define the classpath for a JRuby script,
and I can’t figure out what’s going wrong. Here is the script:
require ‘java’
puts “CLASSPATH = #{$CLASSPATH}”
$CLASSPATH << ‘.’
puts “CLASSPATH = #{$CLASSPATH}”
(This is a simplified test script. My original script tries to import
and use a class on the classpath, but the class is never found. Other
scripts in other languages use the exact same classpath and work
properly, finding the class.)
I’ve tried setting the CLASSPATH more than one way:
$ export CLASSPATH=foo:bar:.
$ jruby ./foo.rb
CLASSPATH =
CLASSPATH = file:/private/tmp/./
$ jrby -J-cp $CLASSPATH
CLASSPATH =
CLASSPATH = file:/private/tmp/./
I’m on a Mac, using JRuby 1.5.1, but this also happened in 1.4.0 and I
think 1.5.0.
What am I doing wrong?
Jim
Jim M., http://www.io.com/~jimm/
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email