Before building the application, make sure that you can
access the SAMPLE database in DB2 from VisualAge for Java. For this
example, we used DB2 Universal Database for Windows NT, Version
5.2.
Checking for the SAMPLE database
- From the desktop, select Start and then DB2 for Windows
NT.
- Select Administration Tools and then Control
Center. The Control Center window appears.
- Expand the items in the Systems tree until you see Databases.
Expand the Databases folder to verify that the SAMPLE database exists.
If the SAMPLE database does not exist on your workstation, consult the
documentation for the level of DB2 installed on your workstation.
Setting up access to DB2 from VisualAge for Java
- From the menu bar of the Workbench, select Window and then
Options.
- From the left pane, select Resources.
- To the right of the Workspace class path field, select
Edit. A dialog appears.
- From the dialog, select Add Jar/Zip. A standard file
selection window appears.
- Within the file selection window, find the sqllib directory created as
part of the DB2 installation.
- Double-click on the java folder and select
db2java.zip.
- Select Open.
- Select OK to close the dialog.
- Select Apply to add the directory to the class path.
- Select OK to close the Options window.
