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 view of the Java perspective, 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 through commands on the pop-up menu in the editor.

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

Related tasks
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

Comentarios