}
private void loadScript(Writer out, Writer err, boolean isDebugging) {
try {
if (interpreter == null) {
RubyInstanceConfig config = new RubyInstanceConfig();
if (isDebugging)
config.setCompileMode(CompileMode.OFF);
List<String> loadPaths = new ArrayList<String>();
setModule(loadPaths);
String appRubyPath = System.getProperty(PROP_APPLICATION_RUBYPATH);
if (appRubyPath != null) {
StringTokenizer tok = new StringTokenizer(appRubyPath, ";");
while (tok.hasMoreTokens())
loadPaths.add(tok.nextToken().replace('/', File.separatorChar));
}
config.setOutput(new PrintStream(new WriterOutputStream(out)));
config.setError(new PrintStream(new WriterOutputStream(err)));
interpreter = JavaEmbedUtils.initialize(loadPaths, config);
interpreter.evalScriptlet("require 'marathon/results'");
}
if (type == MarathonAppType.JAVA) {
interpreter.evalScriptlet("require 'marathon/playback'");