static boolean isJavaCompilable(String text) ctex { Class javax = getJavaX(); File srcDir = (File) call(javax, "TempDirMaker_make"); saveTextFile(new File(srcDir, "main.java").getPath(), text); File classesDir = (File) call(javax, "TempDirMaker_make"); new List libraries; try { call(javax, "compileJava", srcDir, libraries, classesDir); return true; } catch (Exception e) { return false; } }