After upgrading from Java 1.7 to Java 1.8, I am getting the below error when having sqljdbc4.jar (version 4.0) in my build path. How can I resolve this problem?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In the details section of the download page for the driver, the Java compliance is listed:
The Microsoft JDBC Driver 4.2 for SQL Server is JDBC 4.2 compliant and runs on the Java Development Kit (JDK) version 5.0, 6.0, 7.0, and 8.0.
The Microsoft JDBC Driver 4.1 for SQL Server is JDBC 4.0 compliant and runs on the Java Development Kit (JDK) version 5.0, 6.0, and 7.0.
The Microsoft JDBC Driver 4.0 for SQL Server is JDBC 4.0 compliant and runs on the Java Development Kit (JDK) version 5.0 or 6.0.
In other words, you need to upgrade to version 4.2 in order to be sure that it works with Java 8.