public void compile() {
        try {
            JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
            if (compiler == null) {
                return;
            }
            DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
            StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
            Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromStrings(Arrays.asList(Configuration.SOURCE_DIR
                    + File.separator + name + ".java"));
            JavaCompiler.CompilationTask task = compiler.getTask(null,
                    fileManager, diagnostics, null,
                    null, compilationUnits);
            boolean success = task.call();
            File output = new File(Configuration.COMPILED_DIR + File.separator + name + ".class");
            File input = new File(Configuration.SOURCE_DIR + File.separator + name + ".class");
            input.renameTo(output);
            fileManager.close();
            Application.window.getActiveBot().getLogger().log(new LogRecord(Level.INFO, success ? "Compiled Script : " + name
            : "Compilation Error"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }