@Override
	public void actionPerformed(ActionEvent ae) {
		File scriptDir = new File("scripts");
		scriptDir.mkdirs();
		saveScript();
		try {
			File javaSrcFile = new File(scriptDir, scriptName + ".java");
			Writer p = new FileWriter(javaSrcFile);
			String script = pluginHead + codeArea.getText() + pluginTail;
			p.write(script);
			p.close();
			JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
			StandardJavaFileManager fileManager = compiler
					.getStandardFileManager(null, null, null);
			Iterable<? extends JavaFileObject> units;
			units = fileManager.getJavaFileObjectsFromFiles(Arrays
					.asList(javaSrcFile));
			CompilationTask task = compiler.getTask(null, fileManager, null,
					null, null, units);
			task.call();
			fileManager.close();
			javaSrcFile.delete();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}