Help Center/ GaussDB/ Developer Guide(Distributed_V2.0-2.x)/ Application Development Guide/ Development Based on JDBC/ Loading a Driver
Updated on 2025-08-19 GMT+08:00
Loading a Driver
Load the database driver before creating a database connection.
You can load the driver in the following ways:
- Before creating a connection, implicitly load the driver in the code using the Class.forName("org.postgresql.Driver") method.
- During the JVM startup, transfer the driver as a parameter to JVM using the java -Djdbc.drivers=org.postgresql.Driver jdbctest argument.
- jdbctest is the name of a test application.
- If opengaussjdbc.jar is used, change the driver class name to com.huawei.opengauss.jdbc.Driver.
Parent topic: Development Based on JDBC
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.