Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Dora Medina   on Apr 01 In Java Category.

  
Question Answered By: Elias Turner   on Apr 01


Instead of

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

use

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

as this loads the class  explicitly - see

java.sun.com/.../driverma
nager.doc.html

This will also let you know if the driver  can't be found.

Also check that the path to the jar containing the Driver is in the
Java runtime classpath, something like

java -cp .;%ORACLE_HOME%/ora81/jdbc/lib/classes111.jar MyClass

(replace %ORACLE_HOME% with the oracle  folder)

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on help me connecting to oracle8 P.E. Or get search suggestion and latest updates.


Tagged: