We help IT Professionals succeed at work.

how to find if oracle driver is present

thahirkk
thahirkk asked
on
how to find if the client machine has a oracle driver
Comment
Watch Question

Senior Engineer
Commented:
Assuming you mean a JDBC driver, you could use:

    boolean found = false;
    try {
        Class driver = Class.forName("oracle.jdbc.driver.OracleDriver");
        found = true;
    } catch (ClassNotFoundException e) {
    }

If the OracleDriver class can be found in the CLASSPATH, the ClassLoader will load it (and register it with the DriverManager). If it cannot be found, the ClassNotFoundException is thrown.

Best regards,
Jim Cakalic

Author

Commented:
thanks a lot boss it was really helpfull
regards
thahir

Explore More ContentExplore courses, solutions, and other research materials related to this topic.