JRE 9模块需要找不到的模块(JRE 9 module requires a module that was not found)

系统教程 行业动态 更新时间:2024-06-14 17:04:02
JRE 9模块需要找不到的模块(JRE 9 module requires a module that was not found)

运行我的项目时,我得到的错误是:

Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.soap not found, required by java.xml.ws

据我所知, java.xml.ws是一个JRE模块而java.xml.soap不是,基于文档中提供的列表。 我开始我的程序的方式是:

java --upgrade-module-path c:/git/projectdir --add-modules java.xml.bind,java.xml.ws,java.xml.ws.annotation -cp c:/git/projectdir/Uservice.jar com.gert.DynamicService "arg1" "arg2" "arg3"

当我尝试将java.xml.soap添加到add-modules时,它无法找到该模块。

我的问题是:

java.xml.soap是一个JRE模块吗? 如果java.xml.soap不是JRE模块,为什么java.xml.ws模块依赖于不在JRE中的模块? 在哪里可以找到java.xml.soap模块?

我正在使用java 9.0.1

When running my project I get the error that says:

Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.soap not found, required by java.xml.ws

As far as I understand java.xml.ws is a JRE module and java.xml.soap is not, based on the list provided in the documentation. The way I start my program is:

java --upgrade-module-path c:/git/projectdir --add-modules java.xml.bind,java.xml.ws,java.xml.ws.annotation -cp c:/git/projectdir/Uservice.jar com.gert.DynamicService "arg1" "arg2" "arg3"

When I try to add java.xml.soap to add-modules it cannot find the module.

My question is:

is the java.xml.soap a JRE module? if java.xml.soap isn't a JRE module, why does the java.xml.ws module depend on a module that isn't in the JRE? where to find the java.xml.soap module?

I'm using java 9.0.1

最满意答案

java.xml.soap是JRE模块吗?

不,这不是一个平台模块。 运行java --list-modules ,你不会在输出中看到java.xml.soap 。

如果java.xml.soap不是JRE模块,为什么java.xml.ws模块依赖于不在JRE中的模块?

有两个java.xml.ws模块。

第一个是平台模块,它已被弃用(您不应该使用它)。

第二个是独立模块,它作为jaxws-api部署到Maven中心(你应该使用这个模块)。

虽然这两个模块相似,但存在许多差异。 其中一个是独立的java.xml.ws有自己的依赖项。 例如, java.xml.ws依赖于java.xml.soap ,它也被部署到Maven中心(如javax.xml.soap-api )。

在哪里可以找到java.xml.soap模块?

往上看。 你可以在Maven中心找到它。 如果您使用Maven,它应该作为jaxws-api的依赖项自动选取。

我认为,可升级文件夹c:/git/projectdir缺少java.xml.soap 。 您应该从.m2\repository\javax\xml\soap\javax.xml.soap-api复制jar。

Is the java.xml.soap a JRE module?

No, this is a not a platform module. Run java --list-modules and you will not see java.xml.soap in the output.

If java.xml.soap isn't a JRE module, why does the java.xml.ws module depend on a module that isn't in the JRE?

There are two java.xml.ws modules.

The first one is a platform module and it is deprecated (you should not use it).

The second one is a standalone module which is deployed to Maven central as jaxws-api (you should use this module).

While these two modules are similar, there are a number of differences. One of them is that standalone java.xml.ws has its own dependencies. E.g. java.xml.ws depends on java.xml.soap which is deployed to Maven central too (as javax.xml.soap-api).

Where to find the java.xml.soap module?

See above. You can find it in Maven central. If you use Maven, it should be picked up automatically as a dependency of jaxws-api.

I think, java.xml.soap is missing in your upgradeable folder c:/git/projectdir. You should copy the jar from .m2\repository\javax\xml\soap\javax.xml.soap-api.

更多推荐

本文发布于:2023-04-24 20:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/e118417edcf8a746113d1619a9cdd44a.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   找不到   JRE   module   requires

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!