微软最新的jdbc直连jar包 Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); String url ="jdbc:sqlserver://localhost:1433;DatabaseName=Northwind"; String user = "sa"; String password = " "; Connection conn = DriverManager.getConnection(url, user, password);