Before you begin
To develop
SQLJ applications, the following software
is required:
- Network or local access to a database server
that supports SQLJ is needed.
For DB2®,
use one of the following versions:
- DB2 Universal Database™ for Linux®, UNIX®,
and Windows®, Version 8 or later
- DB2
Universal Database for z/OS®, Version 7 or later
- Corresponding database client software must be installed on your
workstation.
For DB2
Universal Database, the version 8 client or later is required.
To develop SQLJ applications in the workbench, your project
must support Java™ development.
For example, you can use a J2EE project, a Web project, an EJB project,
or
a Java project.
Limitation: SQLJ
development is not supported for projects that have separate output
directories
for each source folder, instead of one output directory for the project.
Your
project can use only one output directory.
Procedure
To
develop an SQLJ application:
- Click
, or click the New toolbar
button.
- In the New window, expand the Data folder,
and then expand the SQLJ Applications folder.
- Select the appropriate SQLJ wizard and then click Next.
- Optional: Edit your SQLJ files with
the SQLJ editor.
- Build
the project. The
workbench runs the SQLJ translator on the SQLJ files to convert them
to Java code,
and then compiles the generated Java files.
- To run the code in the project, click the Run toolbar
button or click .
- To debug the application, click
the Debug toolbar
button or click to debug SQLJ files using
the Debug wizard.
- DB2
Universal Database only: After the project is running properly,
use a
wizard to customize
and bind
the SQLJ profiles to the database.