ProcessBuilder, require, load path, and java.class.path

I am working with a library that uses ProcessBuilder to fork another JVM
process however the forked process is unable to find any of the jars I
required in my ruby program e.g. “Error: Could not find or load main

After looking over
(ClasspathAndLoadPath · jruby/jruby Wiki · GitHub)
I am still unsure about what the best approach to adding jars & paths to
the java.class.path System property.

My workaround for this is to set the property manually, e.g.

full_classpath = [[‘java.class.path’],
File.join(File.expand_path(‘…/…/vendor/jars-test’, FILE), ‘*’)][‘java.class.path’] =

Is there a better way to do this?

Ariel V.
e-mail: [email protected]
skype: ariel.s.valentin
twitter: arielvalentin
linkedin: Sign Up | LinkedIn