Configure the JDBC driver
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Perform the following steps to configure the JDBC driver:
- Set
CLASSPATH. On Windows, setCLASSPATHwithin the environment of your Java client. Some programs such as Tomcat may set Java classpath in the registry and may ignore environment variables. Review the necessary steps for the parent process of the JDBC connection to see how the Java classpath must be set.In this example, you can set theCLASSPATHby the following command in Linux:CLASSPATH=$DLC/java/openedge.jar:$CLASSPATH - To load the JDBC driver, the application needs to load the
class.
"com.ddtek.jdbc.openedge.OpenEdgeDriver".For example, add the java call:Class.forName( "com.ddtek.jdbc.openedge.OpenEdgeDriver"); - Use
DriverManager.getConnectionfor the connection string to establish a JDBC connection:Example 1Connection con = DriverManager.getConnection ( url ); String url; url = new String ( "jdbc:datadirect:openedge://host:port;databaseName=sports2000;user = jones;password = secret" );