Where is the ojdbc jar file

こ雲淡風輕ζ 提交于 2019-12-25 02:08:59

问题


I am using oci driver to connect to oracle 11.2.0 on Linux, I found that under LD_LIBRARY_PATH, there is only libocijdbc11.so but any ojdbc jar files, is that right? For database connection, am I supposed to add this *.so file to java CP?

I can't test it right away because it is on customer production environment, so just want to get what's the gist first, thanks for any guide!


回答1:


you can find the ojdbc*.jar files under $ORACLE_HOME/jdbc/lib and the *.so files must not be included in your CP, but the environment variable LD_LIBRARY_PATH have to be set to the right directory




回答2:


You will get those jars when installing the Oracle Client, the ojdbcX.jar files appear in ORACLE_HOME/jdbc/lib.

The *.so isn't a java library, and it shouldn't be included in the classpath. It should be available in LD_LIBRARY_PATH.

Check out the Verification of a JDBC Client Installation section in the Oracle guide.




回答3:


In Eclipse under project folder->WEB-INF->lib then Right click lib folder-> Build Path->Configure Build Path->Under Libraries->Click on Add External Jars->Computer->Local Disk (C:)->oraclexe->app->oracle->product->10.2.0->server->jdbc->lib->now select ojdbc14.jar

Directly the path is C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar



来源:https://stackoverflow.com/questions/7804506/where-is-the-ojdbc-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!