Configuration Under Eclipse


Generally speaking, configuration of the various packages is development environment-specific. One of the more popular development environments is the free, open source Eclipse project (http://www.eclipse.org/). After downloading and installing the environment, you can add various Jakarta Commons components to your project(s). Assuming you are starting with an existing Java project, right-click on the project name and select Properties, as shown in Figure 1-1.

Figure 1-1. Opening project properties.


In the project properties, select the Java Build Path panel and then the Libraries tab, as shown in Figure 1-2.

Figure 1-2. Java Build Path.


If you have copied the JAR file to your project (for example, in the WEB-INF/lib directory), you can click the Add JARs . . . button to add the JAR file to the build path. Alternatively, if you wish to store the JAR file external to the project, click Add External JARs. . . . Either way, you will be presented with a dialog to select the JAR file. Select the file and click OK to exit the project properties. The JAR is now configured on the Eclipse class path, ready for development.

You may want to take advantage of Eclipse's additional features. To complete installation, right-click on the entry for the JAR file and bring up the properties, as shown in Figure 1-3.

Figure 1-3. Opening JAR entry properties.


Enter the path to the Javadoc for the distribution found in the docs/api directory of the binary release, as shown in Figure 1-4.

Figure 1-4. Setting the Javadoc location.


Next, if you have downloaded the source for the package, you can click on Java Source Attachment in the JAR properties dialog and set the source location, as shown in Figure 1-5. Note that the source is contained in the src/java directory.

Figure 1-5. Setting the source location.


By setting the Javadoc location, Eclipse will display the Javadoc contents in addition to the type-ahead information, as shown in Figure 1-6. Setting the source location will allow you to seamlessly bring up the source for the package when debugging.

Figure 1-6. Quick Javadoc information access.


All of the Commons packages follow the same distribution structure and are downloaded from the same pagesthe next step is to learn the actual packages.



    Apache Jakarta Commons(c) Reusable Java Components
    Real World Web Services
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 137
    Authors: Will Iverson

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net