File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Oracle database connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle database connection" Watch "Oracle database connection" New topic
Author

Oracle database connection

anu rani
Greenhorn

Joined: Aug 29, 2006
Posts: 14
I want in detail how to connect to oracle databse.

Regarding classpath,what to install.

I have j2sdk1.4.2,oracle8i,tomcat6.0

Class.forName("Oracle.jdbc.driver.OracleDriver").newInstance();
con = DriverManager.getConnection("jdbcracle:thin:@192.168.10.5:1521:bits", "buildnova", "nova");
error:
java.lang.ClassNotFoundException: Oracle.jdbc.driver.OracleDriver
please let me know how to resolve this error
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Put the Oracle JDBC in the classpath of your application. JDBC drivers do not come with java.


My Blog: Down Home Country Coding with Scott Selikoff
arun nohwar
Greenhorn

Joined: Aug 05, 2008
Posts: 16
You need the driver. The driver is something that takes your makes your jdbc java calls, understandable to database.
You will find the oracle driver in folder "jdbc" of oracle isntallation directory.
The name of driver is "ojdbc14.jar".
Put this driver(jar file), in your classpath, and the above application will run smoothly.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


The name of driver is "ojdbc14.jar"

For Oracle 8i it is classes12.zip.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

Paul,
For your information, the java/JDBC/database interoperability information is available in the Oracle JDBC FAQ:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html

Good Luck,
Avi.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Avi Abrami:
Paul,
For your information, the java/JDBC/database interoperability information is available in the Oracle JDBC FAQ:

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html

Good Luck,
Avi.


Thank you Avi, I'm very aware of that. My intention was to correct agun nohwar's post, Oracle 8i does not ship with ojdbc14.jar, it ships with classes12.jar, so anu rani will not be able to find that jar file.

They could (and probably should) of course download a much more recent driver directly from Oracle.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle database connection