/**
* Performs the actual run.
*/
protected void doRun() {
Jython jython;
Class[] classes;
Object[] params;
String argv;
String arg;
int i;
classes = new Class[]{String.class};
params = new Object[]{m_Owner.getFilename().getPath()};
argv = "sys.argv = ['" + Utils.backQuoteChars(m_Owner.getFilename().getPath()) + "'";
for (i = 0; i < getArgs().length; i++) {
arg = Utils.backQuoteChars(getArgs()[i]);
argv += ", '" + arg + "'";
}
argv += "]";
jython = new Jython();
// set commandline parameters
jython.invoke("exec", new Class[]{String.class}, new Object[]{"import sys"});
jython.invoke("exec", new Class[]{String.class}, new Object[]{argv});
jython.invoke("execfile", classes, params);
}