代码摘抄:Class Driver, from mysql-connector-java-8.0.17.jar

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.mysql.cj.jdbc;

import java.sql.DriverManager;
import java.sql.SQLException;

public class Driver extends NonRegisteringDriver implements java.sql.Driver {
    public Driver() throws SQLException {
    }

    static {
        try {
            DriverManager.registerDriver(new Driver());
        } catch (SQLException var1) {
            throw new RuntimeException("Can't register driver!");
        }
    }
}

说明:a same name, interface Driver which is not class from package java.sql on rt.jar

上一篇:JDBC+MySQL+jsp+sevlet登录案例


下一篇:Java -- JDBC学习笔记6、事务