< Zurück | Inhalt | Weiter >

Chapter 10

Integrated Development Environments


Some people prefer glitz. The shiny sparkle has always attracted the human eye. Sometimes that sparkle is a real gem, a treasure; sometimes it’s only a gum wrapper on the sidewalk. Integrated Development Environments (IDEs) add glitz to Java development. At their most basic, they combine (integrate) an editing environment with a compiler. This gives you

• Language-specific formatting of your Java text (different colors, comments in italics, and so on)

• Quick feedback on errors (the ability to click on a compile error message to begin editing at the offending Java statement)

• Automatic word completion, to help you finish typing the names of methods in your Java code

• A point-and-click GUI for that all important “modern” look-and-feel

If those were all they gave you, IDEs would be, in our opinion, leaning toward “gum wrapper.” But a good IDE can be more than that. It can be extended to integrate many different tools, including:


• Version control (e.g., CVS, see also Chapter 8)

• One or more Web servers (e.g., Tomcat)

• A build control mechanism (e.g., ant, see also Chapter 9)

• Other editors besides the built-in editor

• A specialized editor for building GUIs

• Other languages besides Java



In this chapter we will examine two major Open Source IDEs, NetBeans and Eclipse. We will show a straightforward installation of each. We will describe the “operating paradigm” of each and show a few major features. It should be enough to get you started using them.

There are several major commercial IDEs, including Idea by IntelliJ, JBuilder from Borland, WebSphere Studio from IBM, SunONE Studio (Enter- prise Edition) from Sun, and others. Because they are commercial, and not Open Source, we will not be covering them; their vendors and other experts can provide the documentation and training you need. Be advised, however, that the licenses for such commercial products typically cost anywhere from several hundred to a few thousand dollars per seat. That can make Open Source IDEs look very attractive.


NetBeans is an Open Source IDE, freely available, with full source code. It is also the basis for the SunONE Studio (more on that product later).


10.2.1 A Brief History of NetBeans1

10.2.2 Installing NetBeans

10.2.3 Getting Around in NetBeans

10.2.4 Integration with CVS

10.2.5 Integration with Ant

10.2.6 Other Add-on Tools

10.4.1 Selecting and Installing Eclipse

10.4.2 Using Eclipse for a New Project

10.4.3 Using Eclipse for an Existing Project

10.4.4 Working with Eclipse