Before running a Java™ program
that contains embedded SQLJ statements, ensure that you set up your
server to support SQLJ. SQLJ support requires that you modify the
CLASSPATH environment variable for your server.
For more information about working with Java classpaths, see the following page:
Java classpath
Using
SQLJ and J2SE
To set up SQLJ on a server running any supported
version of J2SE, complete the following steps:
- Add the following files to the CLASSPATH environment variable
for your server:
- /QIBM/ProdData/Os400/Java400/ext/sqlj_classes.jar
- /QIBM/ProdData/Os400/Java400/ext/translator.zip
Note: You need to add translator.zip only when you want to
run the SQLJ translator (sqlj command). You do not need to add translator.zip
if you only want to run compiled Java programs
that use SQLJ. for more information, see
The
SQLJ translator (sqlj)
- At an IBM® i command prompt, use the following command to add a link to
runtime.zip from your extensions directory. Type the command on one
line, then press Enter.
ADDLNK OBJ('/QIBM/ProdData/Os400/Java400/ext/runtime.zip')
NEWLNK('/QIBM/UserData/Java400/ext/runtime.zip')
For more information about installing extensions, see the following
page: Install extensions
for the IBM Developer Kit for Java