No suitable driver found for jdbc:oracle:oci:@
581160Jun 12 2007 — edited Jun 13 2007Hello, I am able to compile my java program and run it. If I create an executable jar
and try to run it I get an error - No suitable driver found for jdbc:oracle:oci:@.
The classpath = .;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Java\jre1.6.0_01\bin
I load the driver using this code.
//load the oracle JDBC Driver.
Class.forName("oracle.jdbc.driver.OracleDriver");
And try to get a connection using this code
conn = DriverManager.getConnection("jdbc:oracle:oci:@", userIdTextField.getText(), PasswordField.getText() );
I have tried classes11 and classes12 jar files but same error.
I get the same error if I set the classpath at run time with -classpath.
Any ideas or suggestions would be a great help. I have been trying to solve this for 2 days.
Thanks
Sami