hi , I have to get a connection and do databse operations. I know the following things. but how to make set up to avoid ClassNotFoundException.
code is:
try{ Class c = Class.forName("OracleDriverName"); Connection connection = DriverManager.getConnection("URL","USER","PWD"); System.out.println("helloWorld: = "+c); }catch(Exception e ){ System.out.println("Exception is = "+e); }
Here, Class c = Class.forName("OracleDriverName");
here, where the OracleDriverName is put, and from where we can download the oracle driver.please let me know the URL, where i can download the oracle driver.
It should bbe the fully qualified name of the Oracle driver, unless you are using Java 6 and Oracle's JDBC 4.0 driver, in which case that line is no longer required (Oh happy days!)
Either way you'll still need the jdbc driver from oracle.com