xz02
asked on
class not found in type declaration?
Hi,
I am trying to use Orcle thin driver within JDK1.1.
The program is as simple as this:
import java.sql.*;
class JdbcApplication {
public static void main (String args []) throws SQLException {
// Load Oracle driver
DriverManager.registerDriv er (new oracle.jdbc.driver.OracleD river());
// Connect to the local database
Connection conn =
DriverManager.getConnectio n ("jdbc:oracle:thin:@199.81 .96.83:152 1:mkprod",
"forecast_dba", "forecast");
// Query the employee names
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select country from outlook");
// Print the name out
while (rset.next ())
System.out.println (rset.getString (1));
}
}
But the compiler keeps saying "class oracle.jdbc.driver.OracleD river() not found in
type declaration". I have set the right classpath.
Please help.
I am trying to use Orcle thin driver within JDK1.1.
The program is as simple as this:
import java.sql.*;
class JdbcApplication {
public static void main (String args []) throws SQLException {
// Load Oracle driver
DriverManager.registerDriv
// Connect to the local database
Connection conn =
DriverManager.getConnectio
"forecast_dba", "forecast");
// Query the employee names
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select country from outlook");
// Print the name out
while (rset.next ())
System.out.println (rset.getString (1));
}
}
But the compiler keeps saying "class oracle.jdbc.driver.OracleD
type declaration". I have set the right classpath.
Please help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.