These samples demonstrate how to use agents, applications and applets to connect to your Domino or DB2 database.
Before You Begin
To run all of the Domino samples you must follow these steps to set up your
environment:
1. Add the projects from the repository to your Workbench
The easiest way to add a package to your Workbench is by using Quick Start:
2. You must have the DeptDesc.nsf set up in your Domino environment. Using
the command line, copy this file from the X:\IBMVJava\ide\samples
directory
(where X is the drive onto which you installed VisualAge for Java) into your Y:\notes\data
directory (where Y is the drive onto which you installed Notes).
3. Ensure that JavaDlgSettings is in your notes.ini file and that JavaUserClasses includes a path to your SQLLIB directory. If you are missing these settings you can cut the following lines and paste them at the end of your notes.ini file. Make sure that you change the JavaUserClasses path to that of your directory.
JavaDlgSettings=*.class|*.jar,*.cab,*.zip|*.jpg,*.gif,*.au|*.java|1
JavaUserClasses=d:\sqllib\java\db2java.zip
4. After you have changed your notes.ini file, you must close and reopen Notes for the changes to take effect.
5. Make sure that that Notes is in your PATH statement. To look at your
classpath, enter set classpath
on a command line. If the path to your
Notes directory is not in your classpath statement, enter set classpath =
%classpath%path/Notes
. Do not close the command window while running
this sample.
If you want to add the pointer to notes permanently, set your PATH statement in your computer's system settings.
6. If you are using the AgentRunner you must also follow any other set up steps in Setting Up For the Agent Runner.
Preparation for DB2
For the samples that access DB2, you must add the DB2 class library to the IDE and to your
classpath.
To create a project for the DB2 class library:
DB2 class library
in the text field.To import the classes to the repository:
To add the classes to the Workbench:
When you use DB2 you must make sure that the DB2 class library is in the classpath for that sample.
The Samples
Click on a sample name to link to the run and build instructions.
Sample: Using the Domino AgentRunner. This sample demonstrates how to use the AgentRunner with a simple agent.
Sample: Creating a To Do Agent. This sample demonstrates how to create an agent that uses Java AWT and NOI.
Sample: Creating an Agent that Searches Your Database. This sample is an agent which runs against a database retrieving all documents which have the same subject as the document you invoke the agent against.
Sample: Query your Domino or DB2 Database. This sample shows how an agent can access multiple databases.
Sample: Using Data Access Beans to Access Notes. This sample demonstrates how to use Data Access Beans to access a Domino database.
Sample: Using Swing JTable. This sample shows the use of the database support in Swing 1.0.2 using the JTable class and associated classes.