You can run the following command to get the driver version.
java -jar ojdbc14.jar
Run Code Online (Sandbox Code Playgroud)
This gave me o/p as:
Oracle 11.1.0.7.0-Production JDBC 3.0 compiled with JDK5
Run Code Online (Sandbox Code Playgroud)
所以驱动程序版本是11.1.0.7.0,它是JDBC 3.0投诉.
getJDBCMajorVersion & getJDBCMinorVersion您可以在运行时询问您的 JDBC 驱动程序。
检索一个DatabaseMetaData. 调用这两个方法以获取此驱动程序声称支持的 JDBC 规范的主要和次要版本:
请记住,特定驱动程序可能不支持该版本 JDBC API 的所有功能。