*/
public static com.scratchdisk.script.Script compile(File file)
throws ScriptException, IOException {
ScriptEngine engine = ScriptEngine.getEngineByFile(file);
if (engine == null)
throw new ScriptException("Unable to find script engine for " + file);
com.scratchdisk.script.Script script = engine.compile(file);
if (script == null)
throw new ScriptException("Unable to compile script " + file);
return script;
}