Altova StyleVision 2025 Enterprise Edition

The CLASSPATH environment variable is used by the Java Runtime Environment (JRE) or the Java Development Kit (JDK) to locate Java classes and other resource files on your operating system. When you connect to a database through JDBC, this variable must be configured to include the path to the JDBC driver on your operating system, and, in some cases, the path to additional library files specific to the database type you are using.

 

The following table lists sample file paths that must be typically included in the CLASSPATH variable. Importantly, you may need to adjust this information based on the location of the JDBC driver on your system, the JDBC driver name, as well as the JRE/JDK version present on your operating system. To avoid connectivity problems, check the installation instructions and any pre-installation or post-installation configuration steps applicable to the JDBC driver installed on your operating system.

 

Database

Sample CLASSPATH entries

Firebird

C:\Program Files\Firebird\Jaybird-2.2.8-JDK_1.8\jaybird-full-2.2.8.jar

IBM DB2

C:\Program Files (x86)\IBM\SQLLIB\java\db2jcc.jar;C:\Program Files (x86)\IBM\SQLLIB\java\db2jcc_license_cu.jar;

IBM DB2 for i

C:\jt400\jt400.jar;

IBM Informix

C:\Informix_JDBC_Driver\lib\ifxjdbc.jar;

Microsoft SQL Server

C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\sqljdbc.jar

MariaDB

<installation directory>\mariadb-java-client-2.2.0.jar

MySQL

<installation directory>\mysql-connector-java-version-bin.jar;

Oracle

ORACLE_HOME\jdbc\lib\ojdbc6.jar;

Oracle (with XML DB)

ORACLE_HOME\jdbc\lib\ojdbc6.jar;ORACLE_HOME\LIB\xmlparserv2.jar;ORACLE_HOME\RDBMS\jlib\xdb.jar;

PostgreSQL

<installation directory>\postgresql.jar

Progress OpenEdge

%DLC%\java\openedge.jar;%DLC%\java\pool.jar;

 

Note: Assuming the Progress OpenEdge SDK is installed on the machine, %DLC% is the directory where OpenEdge is installed.

Sybase

C:\sybase\jConnect-7_0\classes\jconn4.jar

Teradata

<installation directory>\tdgssconfig.jar;<installation directory>\terajdbc4.jar

 

Changing the CLASSPATH variable may affect the behavior of Java applications on your machine. To understand possible implications before you proceed, refer to the Java documentation.

Environment variables can be user or system. To change system environment variables, you need administrative rights on the operating system.

After you change the environment variable, restart any running programs for settings to take effect. Alternatively, log off or restart your operating system.

To configure the CLASSPATH on Windows 7:

1.Open the Start menu and right-click Computer.

2.Click Properties.

3.Click Advanced system settings.

4.In the Advanced tab, click Environment Variables,

5.Locate the CLASSPATH variable under user or system environment variables, and then click Edit. If the CLASSPATH variable does not exist, click New to create it.

6.Edit the variable value to include the path on your operating system where the JDBC driver is located. To separate the JDBC driver path from other paths that may already be in the CLASSPATH variable, use the semi-colon separator ( ; ).

To configure the CLASSPATH on Windows 10:

1.Press the Windows key and start typing "environment variables".

2.Click the suggestion Edit the system environment variables.

3.Click Environment Variables.

4.Locate the CLASSPATH variable under user or system environment variables, and then click Edit. If the CLASSPATH variable does not exist, click New to create it.

5.Edit the variable value to include the path on your operating system where the JDBC driver is located. To separate the JDBC driver path from other paths that may already be in the CLASSPATH variable, use the semi-colon separator ( ; ).

© 2018-2024 Altova GmbH