yeah this was my code can u find wats thw error is
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.DriverManager.*;
import java.sql.*;
public class simple
{
public static void main(String args[]) throws SQLException,ClassNotFoundException
{
try
{
//DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc
racle
ci
XE","system","vijay");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from sample");
while(rs.next())
{
System.out.println(rs.getString(1));
System.out.println(rs.getInt(2));
}
con.close();
}
catch(SQLException e)
{
System.out.println(e.getMessage());
}
}
}
pls suggest me wat to do ....................thankx in advance ....
after executing the above program i m getting
C:\Program Files\Java\jdk1.5.0\bin>java -classpath . simple
Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.
OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at simple.main(simple.java:15)
pls help folks...................