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.
- Open the menu Window > Preferences.
- Open the preference page Data Management > SQL Development > SQLJ Applications
- 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.
Refer to the Rational RFE Community homepage for details and status of Requests for Enhancements for Rational products. |
---|
Related Information
Was this topic helpful?
Document Information
Modified date:
29 September 2018
UID
swg21445902