oracle.jdbc.pool.OracleDataSource not found
698786Aug 18 2009 — edited Aug 18 2009In JDeveloper 11g, i tried to run the following java code, I got the error:
Error(5,8): class oracle.jdbc.pool.OracleDataSource not found
I guess it is related to some classpath not set, but unable to figure it out, any helps apprecated.
- Denis
----
package myproj;
import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.OracleDataSource;
class JDBCVersion {
public static void main (String args[]) throws SQLException
{
OracleDataSource ods = new OracleDataSource();
ods.setURL("jdbc:oracle:thin:hr/hr@113.130.218.168:1521/mydb");
Connection conn = ods.getConnection();
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();
// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
}
}
------