How to parse the jdbc driver name from the jdbc .jar file

B

Bruce

Hi,

Is there any safe method which can get the right jdbc driver class name
out? I used to use "driver.class", but there maybe many XXXDriver.class
in a single jar file.

-Bruce
 
B

Bruce

In fact, I am trying to implement a general purpose wrapper for various
databases. The design is to put the a jdbc driver into a folder named
"drivers", and my program would register the jdbc driver class right
and provide user a list of current jdbc driver names.
 
B

Bjorn Abelli

??????? said:
You can scan jar-file and find all classes which implement
java.sql.DriverManager.

I think you mean those classes that implements java.sql.Driver.

The DriverManager *manages* drivers...

// Bjorn A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top