Is it possible to use jlink on JDK 11 to make a runtime including the Java SE EE modules that were removed?

此生再无相见时 提交于 2019-12-07 06:47:33

问题


When I try to include java.xml.bind in my runtime I get an error message:

Error: automatic module cannot be used with jlink: java.activation from file:...[url to javax.activation-api-1.2.0.jar in my gradle cache]

I'm using these artifacts on the module-path:

"javax.xml.bind:jaxb-api:2.4.0"
"org.glassfish.jaxb:jaxb-runtime:2.4.0-b180830.0438"

It seems that with JDK 11, modules were removed but no fully-modularized replacements have been made available. So jlink can't make a runtime from them.

Why weren't the external replacements properly modularized, given that they were already modules in JDK 10?

Not only is java.activation still not modularized, it has a new module name, "jakarta.activation". See https://eclipse-ee4j.github.io/jaf/#Latest_News I believe that further breaks things, as everything that depends on that module will have to change again before jlink will run.

来源:https://stackoverflow.com/questions/53806586/is-it-possible-to-use-jlink-on-jdk-11-to-make-a-runtime-including-the-java-se-ee

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