Previous Section
Table of Contents
Next Section


AntRunner for JBuilder

JBuilder is a Java development tool from Borland. JBuilder Enterprise edition 7 and later support Ant. AntRunner is a plug in for JBuilder that executes Ant scripts in JBuilder. AntRunner is freeware available at http://antrunner.sourceforge.net/.

Configuring AntRunner for JBuilder

You can download the AntRunner zip file from http://antrunner.sourceforge.net. This zip file contains four files: antrunner.jar, antrunner.config, antrunnerdoc.jar, and antrunnerlogger.jar. To configure AntRunner:

  1. Place the antrunner.jar and antrunner.config files in the /lib/ext/ directory in the home directory of JBuilder.

  2. Place the antrunnerdoc.jar file in the /doc/ directory in the home directory of JBuilder. The home directory is the path where JBuilder is installed. For example, if JBuilder is installed at C:\Program Files\JBuilder, the home directory is C:\Program Files\JBuilder.

  3. Place the antrunnerlogger.jar file in the /lib/ directory of the Ant installation.

  4. Modify the antrunnerconfig.jar file to specify the location of your installation. The antrunnerconfig.jar file contains the text addjars <your path to ANT_HOME goes here>/lib. You need to replace the text <your path to ANT_HOME goes here> with the path of the /lib directory. For example, if you have downloaded the zip file on the C:\ drive, the command is addjars C:\ant\lib.

After configuration, JBuilder adds three icons, Run ANT for default target, Stop ANT, and Reload ANT buildfile, to the toolbar. Using the icons, you can access the controls on Ant targets.

Running the AntRunner Tool

You need to specify the Ant batchfile to AntRunner when you start AntRunner for the first time. The AntRunner window appears, as shown in Figure 6-5:

Click To expand: This figure shows the ant.bat Ant batchfile.
Figure 6-5: The AntRunner Window

To run Ant:

  1. Select Ant from the Wizards menu option.

  2. Select the Add button to select the buildfile. The Ant Wizard window that contains the selected buildfile appears, as shown in Figure 6-6:

    Click To expand: This figure shows the build.xml buildfile. You can delete this file using the Remove button.
    Figure 6-6: The Ant Wizard Window

  3. Select the buildfile and click OK in the Ant Wizard window. The selected buildfile appears as a node in the Project tree in the left pane of the window, as shown in Figure 6-7:

    Click To expand: This figure shows the build.xml buildfile as a node in the Project tree.
    Figure 6-7: The Project Window

  4. Right-click the Ant node and select the Make option. AntRunner displays the output of the build, as shown in Figure 6-8:

    Click To expand: This figure shows that the build was successful.
    Figure 6-8: The Build Output



Previous Section
Table of Contents
Next Section