Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();这个写了没?另外,你这行没有任何错误,建议你把错误信息贴出来