Setting the CLASSPATH

NoteIf you are using the Java Runtime Environment (JRE) or jView instead of the Java Development Kit (JDK), see the documentation for those products for instructions on setting the CLASSPATH variable.

CLASSPATH is the location of the jConnect runtime classes and/or jar files for JDK 1.4.x or later. This section describes what you need in your CLASSPATH depending on which versions of JDK and jConnect you are using.

NoteOn Windows NT, Windows 95, and older Windows systems, make sure that file and directory names are no longer than eight characters plus a three-character suffix (“8.3 format”), or that you use abbreviated (“mangled”) names as displayed in a DOS directory listing (for example, progra~1 instead of program files).

Using jConnect 6.0 with JDK 1.4.x and later

To use jConnect 6.0 with JDK versions 1.4.x and later, set the CLASSPATH:

Running samples or TDS-tunnelling servlet

To run the samples or the TDS-tunnelling servlet, set the CLASSPATH environment variable:

NoteSybase does not recommend running any JDK version earlier than 1.4.x with jConnect 6.0.

In addition, the CLASSPATH should include the location of any application classes you have defined.

CLASSPATH restriction using Netscape

If you use Netscape, some restrictions may apply to the way you set your CLASSPATH environment variable.

The Java VM security manager will not allow a version of jConnect installed in your local file system to create a connection to a server, even if the server is your local system. This can create a problem if you use Netscape to run an applet that uses jConnect.

When Netscape needs to load jConnect to create a connection to a server, it looks for a CLASSPATH defined in its environment to find the jConnect classes. If it finds a CLASSPATH that you have defined to point to your local jConnect installation, it loads jConnect directly from the local file system, rather than from the server, and tries to create a connection. This generates a security error and the connection fails.

Therefore, if you are using Netscape to run jConnect applets, do not set the CLASSPATH to the local jConnect directory.