How to add the ojdbc jar to my project and use it

前端 未结 5 984
梦毁少年i
梦毁少年i 2021-01-15 16:32

I need some help with the eclipse.

I have a project which need to connect to oracle databases so i have the ojdbc jar file and a simple project.

try          


        
相关标签:
5条回答
  • 2021-01-15 16:41

    Always use the latest JDBC driver.

    Refer to this link where all Java developer tools are described on how to choose the JDBC drivers.

    0 讨论(0)
  • 2021-01-15 16:46

    You will have to add the jar to your Classpath. You can do that in eclipse by right clicking on the Project --> Build Path --> Configure Build Path

    Under Libraries tab, click Add Jars and give the Jar (oracle jdbc driver).

    Oracle JDBC Driver download here

    0 讨论(0)
  • 2021-01-15 16:49

    To Add ojdbc14.jar file into the project 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

    0 讨论(0)
  • 2021-01-15 16:57

    In my Java projects, I create a /lib directory at the same level as /src and /bin. I throw any library jars in there and then right-click on the .jar file and do "Build Path | Add to Build Path."

    0 讨论(0)
  • 2021-01-15 17:01

    Ok. finally The solution is to add the jar file into the Web-Inf/lib directory because I have a Dynamic web application. Thank you all.

    0 讨论(0)
提交回复
热议问题