hi all
i was installed jdk1.5 and oracle 10g.
i got a runtime error like this.
i want to compile and run the same program in command prompt and eclipse also .
import java.sql.*;
public class Oapp2
{
public static void main(String args[])
{
try{
Class.forName("oracle:jdbc:driver:OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","scott","tiger");
System.out.println("connected");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
i got an same error in editplus and eclipse as following.
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 Oapp2.main(Oapp2.java:11)
plese help me.