static File findMainJavaInDir(File dir) { File f = newFile(dir, "main.java"); if (f.exists()) ret f; for (File ff : listFiles(dir)) { S s = ff.getName(); if (isInteger(dropPrefixSuffix_orNull("m", ".java", ff.getName()))) ret ff; } null; }