You do not precompile or bind Java programs.
Start your application from the desktop or command line, like any other application. The DB2 JDBC driver handles the JDBC API calls from your application and uses the CAE to communicate the requests to the server and receive the results.
A sample application, DB2Appl.java, is provided in the sqllib/samples/java directory. If you installed the DB2 SAMPLE database, you can run the sample by changing to the sqllib/samples/java directory, and doing the following:
db2start
javac DB2Appl.java java DB2Appl
As an alternative to step 2 above, you can use the pre-compiled version of DB2Appl.java in samples.zip. To do this, ensure CLASSPATH also includes the file sqllib/samples/java/samples.zip. Then, run the java interpreter on the application by entering:
java DB2Appl