@ThreadSafe
public final class DriverLoader
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
cleanup(java.sql.Driver driver)
De-registers the driver.
|
static java.sql.Driver |
load(java.lang.String className)
Loads the specified class using the system class loader and registers the
driver with the driver manager.
|
static java.sql.Driver |
load(java.lang.String className,
java.lang.String pathToDriver)
Loads the specified class by registering the supplied paths to the class
loader and then registers the driver with the driver manager.
|
public static void cleanup(java.sql.Driver driver)
driver
- the driver to de-registerpublic static java.sql.Driver load(java.lang.String className) throws DriverLoadException
className
- the fully qualified name of the desired classDriverLoadException
- thrown if the driver cannot be loadedpublic static java.sql.Driver load(java.lang.String className, java.lang.String pathToDriver) throws DriverLoadException
className
- the fully qualified name of the desired classpathToDriver
- the path to the JAR file containing the driver; note,
this can be a semi-colon separated list of pathsDriverLoadException
- thrown if the driver cannot be loadedCopyright© 2012-21 Jeremy Long. All Rights Reserved.