I have a Java Maven project with about 800 source files (some generated by javacc/JTB) which is taking a good 25 minutes to compile with javac.
When I changed my pom.xml
For the Sun compiler you are starting up a whole JVM process for each file you wish to compile. For the Eclipse compiler it is just connecting to a daemon process. I suggest setting fork to false, although it still may not be quite as fast.