Do I need different version of mysql-connector for jdk 8

。_饼干妹妹 提交于 2020-01-17 08:15:08

问题


I'm using mysql-connector-java-5.1.6-bin with jdk 6 currently but I'm moving my project to jdk 8 do I need to download different version of this jar file?


回答1:


If you want use JDK 8, you need the latest version of mysql connector, Connector/J 8.0

From the What's New in Connector/J 8.0? page:

  • It is a MySQL driver for the Java 8 platform. For Java 7 or earlier, use Connector/J 5.1 instead.



回答2:


You don't require Connector/J 8.0 to run on JRE 8. Connector/J 5.1 works too but 5.1 is getting much less maintenance effort these days.

Connector/J 5.1 works with JRE 1.5 and above, at least until Java breaks compatibility with these older bytecodes.

Connector/J 8.0 works with JRE 8.0 and above.

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-versions.html



来源:https://stackoverflow.com/questions/48005857/do-i-need-different-version-of-mysql-connector-for-jdk-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!