Editing SQLJ files

You can edit SQLJ files in the Workbench in the same way that you can edit Java files.

Lines that contain SQLJ statements are shown in color in the editor. You can specify the color on the SQLJ page in the Preferences window. The editor flags syntax errors in SQLJ statements and Java code.

When you build an SQLJ-enabled project, the workbench runs the SQLJ translator on the file, generates a Java file, and then compiles the Java file. If you enabled automatic building on the Workbench page in the Preferences window (Window > Preferences), when you modify and save a file in the project, the workbench automatically builds the project.

To edit an SQLJ file:

  1. In the Package Explorer, double-click the SQLJ file.

  2. Change the code in the Java statements and SQLJ clauses, as needed.

    While you are editing an SQLJ file, you can also use the SQLJ Assist wizards to add SQLJ clauses to the code. The wizards are available on the editor's pop-up menu.

  3. To save the file, click File > Save.

 

Parent topic

Developing SQLJ applications

 

Related concepts

Debugging SQLJ-enabled Java projects
Building SQLJ-enabled Java projects
Running code in SQLJ-enabled Java projects

 

Related tasks

Setting SQLJ preferences
Setting SQLJ properties for an SQLJ-enabled Java project
Adding an SQLJ connection declaration clause to an SQLJ file
Adding an SQLJ iterator declaration clause to an SQLJ file
Adding an SQLJ assignment clause to an SQLJ file