Java 11 JLink getting error: automatic module cannot be used with jlink: com.microsoft.sqlserver.jdbc from file

流过昼夜 提交于 2020-02-28 06:09:07

问题


I'm trying to add a JDBC connector module to my project with Java 11. I downloaded the MSSqlServer JDBC driver 7.2 for Java 11

https://www.microsoft.com/en-us/download/details.aspx?id=57782

I added the module :

requires com.microsoft.sqlserver.jdbc;

Yet when I try to clean+build, NetBeans tells me:

Error: automatic module cannot be used with jlink: com.microsoft.sqlserver.jdbc from file: /sqljdbc_7.2/enu/mssql-jdbc-7.2.2.jre11.jar

I'm pretty sure this is because the jar doesn't have a compiled module-info.java. However, I was wondering if there is a way to inject one in there?

来源:https://stackoverflow.com/questions/56656822/java-11-jlink-getting-error-automatic-module-cannot-be-used-with-jlink-com-mic

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