public void initialize(String scriptPath) throws Exception {
		try {
			ScriptEngineManager manager = new ScriptEngineManager() ;
			ScriptEngine scriptEngine = manager.getEngineByName("js") ;

			if (scriptEngine == null){
				throw new Exception("ScriptProcessor engine not found") ;
			}
			if (! (scriptEngine instanceof Compilable)){
				throw new Exception("ScriptProcessor engine not found") ;
			}
			Compilable compilable = (Compilable) scriptEngine ;

			InputStream input = null ;
			try {
				input = new FileInputStream(new File(scriptPath));
				if (input == null){
					throw new Exception("Script not found") ;
				}
				InputStreamReader reader = new InputStreamReader(input) ;
				compiledScript = compilable.compile(reader) ;
			} catch (ScriptException x){
				throw new Exception("Script cannot be compiled") ;
			} finally {
				try {
					if (input != null){
						input.close() ;
					}
				} catch (Exception x) { }
			}
		} catch (Exception e){
			throw e ;
		}
	}