This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package oracle.jdbc.driver does not exist

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using jdk1.4
My path is:
set Path=F:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\j2sdk1.4.2_01\bin;F:\oracle\ora92\jdbc\lib\classes12.jar;.;C:\j2sdk1.4.2_01\lib\;F:\oracle\ora92\jdbc\lib\classes12.zip;

import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
{
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc racle:thin:@localhost:1521:nomina", "WEBSPHERE", "WEBSPHERE");
// @machineName ort:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
}
}
==> output:
D:\>javac connjdbc.java
connjdbc.java:5: package oracle.jdbc.driver does not exist
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
^
1 error
Why ?
 
Ravikumar Jambunathan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi max,
try using this url,
("jdbc racle:thin:@<oracle-SID>:1521", "WEBSPHERE", "WEBSPHERE");
or
("jdbc racle ci8:<oracle-SID>", "WEBSPHERE", "WEBSPHERE");
hope this will help you to resolve.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic