path[1] = path[1].replace(System.getProperty("user.dir"),"");//deletes path up to project
path[1] = path[1].replace(path[0],"");//deletes name from path
path[0] = path[0].replace(".class", "");//deletes the .class extension from the name
path[1] = path[1].replaceFirst("/", "");//deletes first instance of "/" for Ruby code to work
}try {
ScriptingContainer container = new ScriptingContainer();
container.setArgv(path);//sets ARGV
container.runScriptlet(new BufferedReader(new FileReader("driver.rb")), "driver.rb");
} catch (FileNotFoundException e) {
System.out.println("No File chosen or file does not exist");
} catch (NullPointerException npe)
{