IBM Support

Migrating SQLJ translator JAR from sqlj.zip to JDBC 4.0 enabled sqlj4.zip in Rational Application Developer

Question & Answer


Question

IBM DB2 brings a JDBC 4.0 enabled .zip file containing the SQLJ translator in form of the sqlj4.zip with DB2 v9.5. How can I use this sqlj4.zip in my IBM Rational Application Developer projects to translate .sqlj files into .java files which utilize JDBC 4.0?

Answer

You need to change the preferences from the default setting using an older version of the sqlj.zip to your more recent sqlj4.zip.

  1. Open the menu Window > Preferences.
  2. Open the preference page Data Management > SQL Development > SQLJ Applications
  3. Click next to the entry SQLJ translator JAR file on the button Browse and browse to sqlj4.zip

Be aware: The project's classpath does not need to contain the SQLJ translator class sqlj.tools.Sqlj. This class is only needed for translation, not at runtime or to resolve the references for the generated .java file. When SQLJ support is added to a project, the default is to add the sqlj.zip to the classpath, since that is the only jar that the tooling is aware of the has the necessary classes. But the user can change this to include a different jar (e.g. db2jcc.jar) that does not contain the class sqlj.tools.Sqlj.

So, usage of different sqlj.zip files for different projects is not possible. Users can submit an enhancement request on the RFE community.


Rational RFE Community homepage

Refer to the Rational RFE Community homepage for details and status of Requests for Enhancements for Rational products.

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Database Tooling","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.1;7.5.2;7.5.3;7.5.4;7.5.5;7.5.5.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21445902