Oracle驅動classes12.jar 與ojdbc14.jar的區別

spectre2發表於2011-06-15
簡單的說,如果使用jdk1.2和jdk1.3就使用classes12.jar;如果使用的jdk1.4和jdk1.5的,就選用ojdbc14.jar。更加詳細的Oracle官方有說明。
以下是Oracle JDBC官方文件的說法:
也就是隨便翻譯一下就理解了。
JDBC Thin for All Platforms
classes12.jar (1,600,090 bytes) - for use with JDK 1.2 and JDK 1.3
在低階JDK版本1.2與1.3中使用的驅動,雖然實際上在1.4,1.5中使用大部分情況也是OK的
classes12_g.jar (2,044,594 bytes) - same as classes12.jar, except that classes were compiled with "javac -g" and contain some tracing information.
新增了編譯除錯資訊的classes12.jar
classes12dms.jar (1,607,745 bytes) - same as classes12.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
新增了支援Oracle動態檢測服務的classes12.jar
classes12dms_g.jar (2,052,968 bytes) - same as classes12dms.jar except that classes were compiled with "javac -g" and contain some tracing information.  
新增了支援Oracle動態檢測服務與編譯除錯資訊的classes12.jar
ojdbc14.jar (1,545,954 bytes) - classes for use with JDK 1.4 and 1.5
在高階JDK版本1.4與1.5中使用的驅動
下面三個同classes12.jar的情況
ojdbc14_g.jar (1,938,906 bytes) - same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information.
ojdbc14dms.jar (1,553,561 bytes) - same as ojdbc14.jar, except that it contains additional code`to support Oracle Dynamic Monitoring Service.
ojdbc14dms_g.jar (1,947,136 bytes) - same as ojdbc14dms.jar, except that classes were compiled with "javac -g" and contain some tracing information.  
orai18n.jar (1,645,114 bytes) - NLS classes for use with JDK 1.2, 1.3, 1.4, and 1.5. This jar file replaces the old nls_charset jar/zip files.
ons.jar (48,492 bytes) - for use by the pure Java client-side Oracle Notification Services (ONS) deamon.
demo.tar (604,160 bytes) or demo.zip (529,267 bytes) - contains sample JDBC programs. ......

 

驅動包classes12.jar用於JDK 1.2和JDK 1.3,而ojdbc14.jar用於JDK 1.4及以上,所以儘量不要使用classes12.jar;

針對不同的資料庫版本選擇相應版本的驅動包;

將驅動包置入應用啟動的classpath中(jboss的lib或者專案lib)

可通過如下連結下載到對應的驅動包:http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html


參考:http://hi.baidu.com/ericzhang10086/blog/item/927b4836bd442d42251f14a4.html

http://blog.itpub.net/post/2333/459963?SelectActiveLayout=a

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14184018/viewspace-698005/,如需轉載,請註明出處,否則將追究法律責任。

相關文章