Skip Headers

# Configuring the TopLink Workbench Environment

Previous

Next

TopLink Workbench reads its environment variables from the `setenv` script in the `<TOPLINK_HOME>\bin` directory.

Before you launch TopLink Workbench, you must configure its environment as follows:

1. Use a text editor to open the `<TOPLINK_HOME>\bin\setenv` script.

   - For Windows, open the `setenv.cmd` file.

   - For UNIX, open the `setenv.sh` file.

2. Ensure that the `JAVA_HOME` environment variable is set:

   - For Windows: `set JAVA_HOME=C:/j2sdk1.4.2_04`

   - For UNIX: `JAVA_HOME=/usr/local/packages/java; export JAVA_HOME`

3. Update the `DRIVER_CLASSPATH` environment variable to add the location of the following (if necessary):

   Note: Do not include any Java classes for your persistent business objects in the `DRIVER_CLASSPATH` variable. Instead, add these persistent business objects in your TopLink Workbench project classpath (see "Configuring Project Classpath").

   - JDBC drivers–if you are using relational projects (see "Relational Projects").

   - J2EE Connector Architecture (J2C) adapters–if you are using EIS projects (see "EIS Projects").

   - J2C `connector.jar` file–if you are using EIS projects (see "EIS Projects").

     The `connector.jar` file contains `javax.resource.cci` and `javax.resource.spi` interfaces that TopLink EIS uses. By default, TopLink Workbench updates its classpath to include the Java 1.5 `connector.jar` file from `<``TOPLINK_HOME``>/j2ee/home/lib`. If this version of the `connector.jar` file is incompatible with your environment, edit the `workbench.cmd` or `workbench.sh` file in `<``TOPLINK_HOME``>/bin` to change the path to this file.

     At runtime, this `connector.jar` file (or its equivalent) must be on your application or application server classpath.

   - Oracle Database `ORACLE_HOME/rdbms/jlib/xdb.jar` file - if you are using direct-to-`XMLType` mappings with an Oracle9i or higher database (see "Direct-to-XMLType Mapping").

   - Custom `Collection` class that you use to override the default `Collection` class that TopLink uses with a mapping container policy (see "Configuring Container Policy").

   Example: Setting DRIVER_CLASSPATH on Windows shows how to set the `DRIVER_CLASSPATH` variable for Windows and Example: Setting DRIVER_CLASSPATH on UNIX for UNIX.

   Setting DRIVER_CLASSPATH on Windows

       set DRIVER_CLASSPATH=C:\OraHome2\jdbc\lib\ojdbc14.jar;C:\Attunity\Connect\Java\lib\attunityResourceAdapter.jar;C:\OraHome2\rdbms\jlib\xdb.jar

   Note:

   If the path to your driver(s) contains spaces, you must enclose the path in double-quotes in the `setenv.cmd` file. For example:

       set DRIVER_CLASSPATH="C:\Program Files\some directory\driver.jar\"

   Setting DRIVER_CLASSPATH on UNIX

       DRIVER_CLASSPATH=/OraHome2/jdbc/lib/ojdbc14.jar;/attunity/connect/java/lib/attunityResourceAdapter.jar;/OraHome2/rdbms/jlib/xdb.jar; export JDBC_CLASSPATH

4. Save and close the `setenv` script.

To use TopLink Workbench in a language different than your default, add the `-Duser.language` and `-Duser.country` options to the `JVM_ARGS` variable in the `workbench.cmd` or `.sh` file. For example, the following arguments will start TopLink Workbench in US English, regardless of default language of your operating system:

`JVM_ARGS="``-Duser.language=en -Duser.country=en_US`"