The runnable starting point is the installed plugin’s New Project wizard. Follow getting started to install the package, create/import the demo and complete its first DB2 startup. No private source clone or separate example download is required.
TodoController.java under src/main/java and find its repository use.
Ctrl+B on TodoRepository should open TodoRepository.sqlj under
src/main/sqlj, rather than requiring you to edit generated Java.findAll(): the repository obtains a JDBC connection from the configured
DataSource, wraps it in a SQLJ context, executes a query into an iterator,
traverses rows and creates Todo objects. The generated code shows its cleanup.:title or :taskId. Ctrl+B should navigate
to its Java declaration. In a disposable copy, try an invalid member name and
confirm highlighting, then undo the change.The .sqlj file is the source you edit. Maven invokes the IBM translator to create
Java and SQLJ profile resources, compiles Java and installs source maps at
process-classes. IDE assistance can work before translation, but execution needs
the complete build/runtime. The starter POM explicitly translates its repository
input; adding another .sqlj requires extending that build input configuration.
For an IDE run/debug select SQLJ Demo (Maven + SMAP). To package from a terminal:
mvn clean package
Use the debugger walkthrough to try stepping, watches, conditions and logpoints in the application.
In a disposable demo copy, change a SQL query’s ordering while keeping the selected columns compatible with the iterator, then rebuild and verify the page result. Do not change generated Java. If a build rejects the SQL, retain its first translator/database message; the IDE is not the final authority on DB2 semantics.
Continue with iterators and connection/execution contexts.