我也查了很多资料,大多数回答都是驱动包不对,但是我连的是2005的数据库,为什么报错会报要用sqljdbc4.jar呢,此驱动包不是用在2008的吗?我做正常的Java的小练习,使用jdbc连接没有任何问题的,而且这个作业我在src目录下也写了测试连接类,结果是没有问题的,但是一用到jsp和数据库连接就出错,求高手给予解答啊,怎么会这样呢,很急啊,要不然以后JAVAEE没法学了,结果运行不出来,悲剧死了 错误代码提示如下:java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0. com.microsoft.sqlserver.jdbc.SQLServerConnection.(SQLServerConnection.java:219) com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:840) java.sql.DriverManager.getConnection(DriverManager.java:582) java.sql.DriverManager.getConnection(DriverManager.java:185) org.apache.jsp.index_jsp._jspService(index_jsp.java:93) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)而且sqljdbc4我也下了,导进去,依然如上一样报错,纠结