Step 3: Setting environment variables

To run the administration tools, several environment variables must be defined or modified. This is usually done in the sa_config.sh file, which is created by the SQL Anywhere installer. To use the sa_config.sh file, just copy it and set SQLANY12 to point to the deployment location.

Otherwise, to set the environment up yourself, you must do the following:

  1. Set the following environment variable:

    SQLANY12="install-dir"
  2. Set the PATH to include the following:

    install-dir/bin32

    (whichever is appropriate).

  3. Set LD_LIBRARY_PATH to include the following:

    For Linux:

    install-dir/jre_1.6.0_linux_sun_i586/lib/i386/client
    install-dir/jre_1.6.0_linux_sun_i586/lib/i386
    install-dir/jre_1.6.0_linux_sun_i586/lib/i386/native_threads

    For Solaris:

    install-dir/jre_1.6.0_solaris_sun_sparc/lib/sparc/client
    install-dir/jre_1.6.0_solaris_sun_sparc/lib/sparc
    install-dir/jre_1.6.0_solaris_sun_sparc/lib/sparc/native_threads

On Mac OS X, the administration tools make use of a shell script stub launcher called sa_java_stub_launcher.sh, generated at install time and placed inside the Contents/MacOS folder of each Java application bundle. As generated, the script sources the System/bin64/sa_config.sh file to set up the environment and then runs the JavaApplicationStub binary, which starts the actual Java application. For deployment purposes, sa_java_stub_launcher.sh can be modified as required to set up the environment. The name of the script can be changed by modifying the Info.plist file inside the Java application bundle and changing the string value of the key CFBundleExecutable.