This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes prolems on loading the oracle thin driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "prolems on loading the oracle thin driver" Watch "prolems on loading the oracle thin driver" New topic
Author

prolems on loading the oracle thin driver

nalluri gowri
Greenhorn

Joined: Jun 24, 2013
Posts: 2

import java.sql.*;
class SimpleJdbc
{
public static void main(String ar[])
{
try{
class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(Exception e)
{
System.out.println(e);
}
}
}
nalluri gowri
Greenhorn

Joined: Jun 24, 2013
Posts: 2
nalluri gowri wrote:
import java.sql.*;
class SimpleJdbc
{
public static void main(String ar[])
{
try{
class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Mahender Parkipandla
Greenhorn

Joined: Dec 28, 2009
Posts: 17
What error you come across?
What problem you have faced? You have not given more details?
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2242
    
    7

Did you include the ".newInstance()" part?

Class.forName("oracle.jdbc.OracleDriver").newInstance();

More importantly is the JDBC file in the classpath?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

K. Tsang wrote:Did you include the ".newInstance()" part?

Class.forName("oracle.jdbc.OracleDriver").newInstance();?

This shouldn't be necessary. The driver registers itself when the class is loaded, and Class.forName() causes the target class to be loaded.

More importantly is the JDBC file in the classpath?

That's probably the question here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: prolems on loading the oracle thin driver
 
Similar Threads
Disabling Anchor Tags Using jQuery
charAt and loop question
Walking the DOM tree
Up Arrow key press problem on IE
delete and insert chars inside a along string