Using a graphical integrated development environment (IDE) is a personal thing; some swear by them, others swear at them. Java tools abound, but two in my mind stand out from the rest: Eclipse and NetBeans.
As Eclipse is backed by IBM and NetBeans by Sun, there is significant debate over as to which is the better -- much of it between IBM and Sun. Eclipse is open sourced under the CPL, NetBeans is under the Sun public licence, and rival development teams slug it out in the newsgroups and the press.
Sun would like IBM to integrate Eclipse with NetBeans on the grounds that they are the definitive Java. IBM would like NetBeans to integrate with Eclipse, mostly on the grounds that more people seem to prefer Eclipse. Though groups such as the Java users group Javalobby encourage such moves, neither is obliged to do anything.
A well-implemented IDE actually helps you write code; though the experiences of some programmers suggest that this is sometimes treated with scepticism. Eclipse, for example, will highlight the text of your code to tell you when certain "import" statements are not required (handy for cut & paste junkies), or if a static field should be accessed in a static way. Hovering the cursor over a method calls up its JavaDoc help, and an instance of a class reveals what it is a member of. Most who have tried both tend to agree that the Eclipse editor is faster and more user-friendly than the NetBeans editor, regardless of their overall opinion.
Using the IDEs in anger is the best way to sort out the differences; as it was lying around, the open source ArtOfIllusion was the test victim. Eclipse and NetBeans were fired up and told to use the source as a project. Eclipse recursed the subdirectory, found the packages that make up the main program and auto-magically imported everything except the Java media framework library, which was added manually.
Overall, NetBeans is by far the most configurable for fitting to integrate into existing systems. But for basic team project management, Eclipse seems simpler, managing projects under CVS rather than mounting CVS directories into your project space. But take CVS warnings from Eclipse seriously. For Microsoft users there is a stable release of a Microsoft Visual Sourcesafe plug-in for Eclipse here.
Debugging with either IDE is well integrated, but Eclipse's debug seems to be the closest to fully featured. I've seen programmers switch to Eclipse just so they can use its debugger. Eclipse also filters "TODO" and "DOCUMENTME" comments from the code and displays them in a window. Sounds trivial, but improves writing collaborative code and javadocs.
Both NetBeans and Eclipse sport integral update managers, with NetBeans having the more configurable interface. Both spring a raft of EULAs on you. When Eclipse was installed on a Debian Linux machine by typing "apt-get install eclipse-javac", there were no licence agreements to be acknowledged. Nor for NetBeans, though it did not have a pre-packaged Linux install candidate, and had to be installed from a Sun self-extracting binary. This located Java and ran a GUI installer. Windows installs looked like every other Windows install I've ever seen.
With SCO proving that even once respected companies can turn outrageously litigious, I am getting ever more wary of agreeing to licences. Recently IBM has been talking to Sun about the possibility of open sourcing Java. Sun have previously suggested that IBM open source its Java, but strangely IBM's agreement with Sun appears to prohibit this. Following an open letter at the end of February this year to Sun from IBM's Rod Smith, vice president of emerging technologies with IBM's software group, Sun and IBM will at last be holding talks in mid-March on the possibility of jointly open sourcing Java. Sun are obviously concerned at losing the tight quality control they have on Java, but they stand to gain much from wider adoption.
The upgrade tools allow not just the main programs to be kept up to date, but also the various plug-ins on a per-user or per-system basis. Eclipse has a huge range, from code formatters to UML managers to instant messengers and third-party applications that will specifically integrate with it. Unfortunately Sun and IBM have yet to agree on plug-in standards and they do not inter-operate, so pick your plug-in requirements carefully. Plug-ins in both IDEs will also allow you to develop in other languages than Java, including C++ and C#.
The really big thing NetBeans has over Eclipse is a GUI form designer. If you've encountered these before, you'll know that the code they produce can be a real pain if you ever need to edit it. Once you have edited the code, recreating the GUI and integrating the changes with the code you wrote can be very hard. NetBeans' drops comments in the code, and uses these to keep the GUI design and code in sync.
In the technical arena, Eclipse is about to undergo a transition to 3.0 which has been in beta test build for some time. I saw no pressing reason to upgrade to the 3.0 version from 2.1, and as many of the plug-ins break on 3.0 I'll wait a bit for things to settle in.
NetBeans is in version 3.6 beta as this article goes to press, promising a "code-folding" option, native look-and-feel, and integration with the JavaHelp 2.0 extensible help system.
Politically there is the possibility of great change if things work well between Sun and IBM. It may do nothing, it may change everything -- even produce a cross-platform IDE technically superior to Microsoft's developer tools. Some differences will probably remain between the two, but we may well see such innovations as a common plug-in interface and an Open JVM.
Eclipse - tested V2.1
NetBeans - tested V3.4.1/V3.5