static void renameMainJava(File srcDir, S progID) { File fMain = new File(srcDir, "main.java"); S src = loadTextFile(fMain); if (tok_classHasModifier(findMainClass(javaTok(src)), "public")) ret; S dummyClassName = dummyMainClassName(progID); src += "\nclass " + dummyClassName + "{}"; saveTextFile(new File(srcDir, dummyClassName + ".java"), src); fMain.delete(); }