Eclipse 3.3 or NetBeans 6.0?

Finally, there's a decision to make!

1 2 3 4 Page 2
Page 2 of 4

Installing NetBeans is better but not without dips in the road. For example, if at the time of installation on Windows, the JDK is not specifically located in C:\Program Files\Java, the installation fails with a dialog stating that no instance of the JDK was found. NetBeans does not ask where the JDK is located: it simply doesn't run. It does give the option of re-running the installation from a command line and specifying the location using a command-line switch, but it provides no example.

NetBeans 6 assumes that you are familiar with the GNU conventions of command-line parameters used by the JVM. Because both Eclipse and NetBeans tout themselves as IDEs for multiple languages (more about that below), there is no reason to think that a developer using any language but Java would know or should care about what the JVM expects. If you've tried installing packages on an unfamiliar VM, you'll quickly appreciate the frustration caused by this carelessness.

Once installed, NetBeans is easier than Eclipse to load with an existing project. A wizard pops up asking for the directory tree for code and for tests and it intelligently loads both. You need only specify any needed libraries it doesn't know about. You can have projects anywhere on your disk. Like most Java IDEs, NetBeans has no equivalent of the Eclipse concept of a workspace and imposes no similar requirement on the location of your project files.

The editing experience

Eclipse has the more visually appealing interface of the two IDEs. The fonts on the Windows version are attractive and readable. (Less so on some versions of Linux, where fonts and line spacing are a long-standing issue.) It is pleasant without ever feeling excessive. Once you begin using features, however, you'll come across a unique and frustrating design issue: dialogs have a tendency to pop up spurious error messages. For example, Figure 1 shows a dialog box in which files are being imported into a project (click to enlarge).

Screenshot of a false Eclipse error message.
Figure 1. A false Eclipse error message

At the top, an error message states that the move is illegal. As you can see toward the bottom of the dialog, the destination for these files has not yet been specified. And still, without knowing the destination, Eclipse balks that the files are being imported illegally. Most experienced Eclipse users have learned to see past Eclipse's false error messages and ignore them. Nonetheless, it is a singularly poor design that makes the product unfriendly to new users. To be fair, NetBeans also does this on occasion, but far less frequently and with better help support.

Eclipse uses other designs that are unique among Java IDEs: he principal one being the concept of perspectives. The idea is that you can click to a new perspective and all of your windows will change to a new context. So, you could go from a Java perspective to a debugging perspective and all (or many) of the windows in the IDE change from editing support to debugging tasks. NetBeans and other Java environments generally merge new windows into tabbed panes inside the currently open windows. Whether you like the wholesale changes of Eclipse perspectives or the more common incremental approach is a matter of individual taste. The benefit of perspectives is that if you load a plugin that uses many windows (for example, a screen design tool) it is easy to switch back and forth between that plugin and your current IDE setup.

As to the pure coding experience, both IDEs have many helpful features. It is not likely that you will need to do something in Java code that you cannot do comfortably in either IDE. This is one of the reasons that Java IDEs are envied by developers working in other programming languages, with the possible exception of C#. As outlined in Table 1, both products offer similar editing options, although not identical.

Table 1. Editing features

FeatureEclipse 3.3NetBeans 6.0
Code refactorings2217
GeneratesGetters/Setters and similar, javadoc, unit tests, UMLGetters/Setters and similar, javadoc, unit tests, UML, BPEL
Spell checking comments and literalsYesNo
Other Java-related editorsJSP, JSF, XML, HTMLJSP, JSF, XML, HTML

In addition to pure editing, both products do background syntax monitoring (Eclipse does background builds) and they quickly inform you of errors in your code that prevent successful compilation. Both provide intelligent auto-completion and generation of simple items, such as getters and setters. Eclipse and NetBeans also can generate unit tests for JUnit, but in both cases these tests are no more than stubs.

1 2 3 4 Page 2
Page 2 of 4