JDBC Oracle 9I question

From: edward <edwk2002_at_yahoo.com>
Date: 5 Jun 2002 09:38:48 -0700
Message-ID: <997459c6.0206050838.1279dc8e_at_posting.google.com>


Hi,
I am new to Java and Oracle. So if this is a trivial question, excuse me.
I have downloaded Oracle 9I from the website http://otn.oracle.com/software/products/oracle9i/content.html

Now I am trying to write a small java program that uses JDBC and connect to the database. Here is my program:

im not sure of how to find the driver for this jdbc-oracle...

this is my program :

import java.sql.*;

class JdbcTest1 {       

    public static void main (String[] args) {

        try {

// Step 1: Load the JDBC driver.
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

// Step 2: Establish the connection to the database.

                      Connection conn =

DriverManager.getConnection("jdbc:oracle:thin_at_marcanthony:1521:dev2","user1","password");
        } catch (Exception e) {  
            System.err.println("Got an exception! ");  
            System.err.println(e.getMessage());  
        }  

    }
}

where marcanthony is my host name, dev2 is my database. error message = Got an exception! = oracle.jdbc.driver.OracleDriver

Do I need to download any drivers or is this ok? what should be done?

Thanks a lot.
-edward Received on Wed Jun 05 2002 - 18:38:48 CEST

Original text of this message