问题
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