Unable to connect to Personal Oracle 9i database
843854Apr 24 2003 — edited May 1 2003I have loaded Borland Jbuilder 8 and Oracle 9i Release 1 Personal Edition in WinXP
When i try to compile the below code , i get the Error
Exception in thread "main" java.lang.NoClassDefFoundError
I have set my CLASSPATH to c:\oracle\ora90\jdbc\lib\classes12.zip
import java.sql.*;
class Employee
{
public static void main (String args [])
throws SQLException
{
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
String url = "jdbc:oracle:oci8:@test";
try {
String url1 = System.getProperty("JDBC_URL");
if (url1 != null)
url = url1;
} catch (Exception e) {
}
Connection conn =
DriverManager.getConnection (url, "scott", "tiger");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
while (rset.next ())
System.out.println (rset.getString (1));
rset.close();
stmt.close();
conn.close();
}
}
Is there anything else i have to do. I even tied compiling from command line but i got the same error. Any help will be higly appreciated