Hacker News new | ask | show | jobs
by MrBuddyCasino 3143 days ago
Java has some flaws, but slow compilation is not one of them. Incremental compilers are available and pretty much eliminate pauses.
2 comments

Really? I've recently been recruited to pitch in on a Java project, they're using maven, and the compiles sure aren't incremental.

What should we be using instead?

Eclipse or IntelliJ IDEs will compile while you code (like C#). Depends on the project setup and dependencies. But I've found that this works for most development until I need to produce an artifact. Then I run maven which does a lot more than just compile code and usually is longer than 40s.
Yeah, having to run a whole IDE just to get incremental compilation is pretty annoying tho. Perhaps I should just bite the Java bullet and try to use IntelliJ.
You don't normally use Maven to compile every change when doing Java projects. Your IDE will incrementally compile what's needed based on importing the Maven config. You use Maven for tasks like packaging, linting, building JavaDocs etc.
I did worked with spring boot and intelijava, and I timed for a decent size project it was over 40 seconds, but I believe a lot of it was Intelijava compiling, anyway, in go is instant.
InteliJ doesn't have a built-in incremental compiler like Eclipse does.