We’re developing a Netbeans 7.2 RCP Java 1.6 application, on MacOS
10.7.3 with JRuby Embed (the ScriptingContainer class) via
“jruby-complete-1.7.0.preview2.jar” as a Wrapped Jar. We deploy the
application to Windows and Macs. We have some JUnit unit tests, and
some Jellytools integration tests.
We are running a scriptlet with JRuby Embed’s
with the following:
ScriptingContainer container = new ScriptingContainer(); StringWriter outWriter = new StringWriter(); StringWriter errorWriter = new StringWriter(); container.setOutput(outWriter); container.setError(errorWriter); container.runScriptlet("require 'write_dicom.rb'");
The script “write_dicom.rb” is a file within one of the modules of our
When we run this as part of a unit test (on Mac or Windows) all is fine.
When its run as part of the installed application itself (on Mac or
Windows) its also fine. When its run as part of a Jellytools
integration test on Mac its fine.
But – when we run it as part of a Jellytools integration test on
Windows we get a LoadError:
LoadError: load error: write_dicom –
java.lang.IllegalArgumentException: URI is not hierarchical
require at org/jruby/RubyKernel.java:1024
(root) at :1
We are not getting a “LoadError: no such file to load”, so we’ve
concluded that the script has been found okay in the load path. And
we’ve turned on loader debugging using
Properties p = System.getProperties();
and confirmed that JRuby has indeed found the script inside the Module’s
What could be going on here? Could it be something specifically related
to the ClassLoader that is used by Jellytools on Windows? And, should I
log this as a bug?
many thanks in advance,