Tuesday, May 24, 2011

Adding JDBC driver on Eclipse IDE for JAVA


I am using Eclipse on Ubuntu 10
Oracle 10G Xpress Edition


Link to download Jdbc drivers for Oracle Database 10g 10.1.0.2 

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc101040-094982.html


Let's assume you have created an Eclipse  project called Java_project  and you want to connect to Oracle. You need to tell Eclipse where to find the jdbc driver file for Oracle. To do that you should do the following:
  • In the Java perspective right-click the project name in the Package Explorer window.
  • In the pop-up menu choose Properties
  • On the left  list of the new window choose Java Build Path
  • On the right part of the window choose the Libraries
  • Click the Add External JARs button
  • In the file chooser search and find the zip file
        /home/o/oracle/jdbc/bin/classes12.zip
  • Click Open to add it to Libraries.
Now you can close the properties window and go back to your project. You should be able to connect to Oracle.

Also check this link :

http://www.ugrad.cs.ubc.ca/~cs304/2009W2/tutorials/JDBC/OracleFromEclipse.htm


I added the below two files :

ojdbc14.jar
classes12.jar









1 comment:

  1. MGM Sports Betting & Casino | $1000 Bonus + $500 Deposit 1XBET 1XBET カジノ シークレット カジノ シークレット 446nfl week 8 against the spread vs. betting advice - aogiadinh123.com

    ReplyDelete