Tutorial 3: Debugging a Java class

In this tutorial, you call JDBCExamples.Query() from Interactive SQL (dbisql), interrupt the execution in the debugger, and trace through the source code for this method.

The JDBCExamples.Query() method executes the following query against the demo database:

SELECT ID, UnitPrice
FROM Products

It then loops through all the rows of the result set, and returns the one with the highest unit price.

You must compile classes with the javac -g option to debug them. The sample classes are compiled for debugging.

NoteTo use the Java examples, you must have the Java example classes installed into the demo database. See “Preparing the database”.