Figure 3. This is NetBeans working with the same Maven-based project that IntelliJ IDEA had open in Figure 1. Notice the extensive functionality in the context menu and its refactor submenu.
Editing and refactoring
The language-aware NetBeans editor detects errors while you type and assists you with documentation popups and smart code completion. It seems to do so with less in the way of noticeable pauses than Eclipse does, although slightly more than IntelliJ IDEA. NetBeans also offers a full range of refactoring tools (shown in Figure 3) to allow you to restructure code without breaking it; performs source code analysis; and offers an extensive set of hints to quickly fix or enhance your code. NetBeans includes a design tool for Swing GUIs, previously known as "Project Matisse."
The Inspect & Transform tool enables you to run inspections across your codebase, while automatically fixing your code. Personally, I always make sure I've checked in all my code and run all my unit tests successfully before running tools that can make sweeping changes; I've been burnt more than once by automatic "fixes" that cause regressions.
Building, debugging, and profiling
NetBeans has good built-in support for Maven and Ant, and a plugin for Gradle. I was pleased to discover that existing Maven projects are now treated as "native," meaning that you simply open them rather than importing them. NetBeans also includes a sexy (and useful) graph view for Maven dependencies.
The NetBeans Java debugger is good, albeit conventional. A separate visual debugger lets you take GUI snapshots and visually explore the GUI of JavaFX and Swing applications. The NetBeans profiler is very nice for understanding both CPU and memory use, and has good tools for finding memory leaks.
Comparing the big three Java IDEs
I personally have used Eclipse, NetBeans, and IntelliJ IDEA over the years, in that chronological order. After each switch, I felt that I had improved my productivity once I got used to the new IDE. Even once I thought I had firmly switched to IntelliJ, however, there were times I had to return to one of the other Java IDEs, for example during the period when Eclipse was the only IDE supported for Android development. (Android Studio, the current official Android IDE is based on IntelliJ IDEA.)
I have full-time Java developer friends who use and swear by each of the big three IDEs. The IntelliJ IDEA users in particular are as loyal to their IDE as Visual Studio C++ and C# coders are to theirs, and claim that their productivity gains returned the cost of their annual subscriptions within a few weeks of use. NetBeans and Eclipse users are almost as loyal to their choices, and some wonder why people pay money for IntelliJ.
Sign up for Computerworld eNewsletters.