Using Java in Agents

Java agents first became supported in Domino as of Release 4.6. These agents could be created in another editor and imported into Domino as an agent. Writing Java agents within the IDE was new to Release 5 and was improved upon in Domino 6. Java agents can be written from scratch in the IDE or can be imported. This section does not cover Java agents because they are covered in detail in Chapter 18, "Writing Java for Domino Applications." Because there are only a few differences between creating an agent using the Formula language or LotusScript and importing a Java agent, an explanation of these techniques is provided later in this chapter.

When you select Imported Java from the Run option in the design pane, a button becomes available at the bottom of the Design pane for importing the Java class files. When you click the Import Class Files button, the Define Java Agent Files dialog box appears, as shown in Figure 11.17. From the dialog box, you can select the class files that must be imported for your agent and reorder them as needed.

Figure 11.17. Importing class files for a Java agent allows you to select them from any directory.

When Java is selected from the Run option in the Design pane, an entire subset of buttons appears at the bottom of the Programmer's pane, as shown in Figure 11.18.

Figure 11.18. Writing a Java agent in the Domino Programmer's pane.

Категории