How to get all Loaded JDBC Driver List in Java?

Below Code shows, how to get all loaded JDBC Driver list in java code –

 * Created on 05-2011 Copyright(c) All Rights Reserved.
package com.kodehelp.javasql;

import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Collections;
import java.util.List;

 * Created by
 * Date: 5/1/11
public class GetLoadedDriverList {
    public static void main(String[] args){
        List drivers = Collections.list(DriverManager.getDrivers());
        for (Object driver1 : drivers) {
            Driver driver = (Driver) driver1;

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.