在eclipse中添加java.xml.ws模块 [英] Add the java.xml.ws module in eclipse
问题描述
我们将要从Java 8迁移到Java 9,并且在我们的代码中我们使用的是soap,因此我需要告诉eclipse使用java.xml.ws模块进行编译.
We are about to migrate from java 8 to java 9, and in our code we are using soap, hence I need to tell eclipse to compile with the java.xml.ws module.
第一步,我不想模块化项目(即添加module-info.java).相反,我想将每个依赖项都保留在未命名的模块中,因此我需要另一种方法将java.xml.ws模块添加到Eclipse Java编译器中(希望通过使用--add-modules = java.xml.ws来完成,但我没有知道将其放在月食中的位置.
In the first step I do NOT want to modularize the project (i.e. adding module-info.java). Instead I want to keep every dependency in the unnamed module so I need another way to add the java.xml.ws module to the eclipse java compiler (hopefully by using --add-modules=java.xml.ws but I don´t know where to put it in eclipse).
我一直在网上寻找解决方案,但到目前为止,没有任何帮助,我发现的大部分内容都是假设您将jar文件转换为模块(第一步中我不想这样做) .还有其他人在日食方面遇到过同样的问题吗?
I´ve been searching the web for solutions but nothing has helped me so far, the most content I have found assumes that you are convert the jar files to modules (which I don´t want to do in the first step). Has anyone else experienced the same problem in eclipse?
推荐答案
- 转到 Project>属性:Java构建路径 ,标签 Libraries
- 选择 JRE>是模块化 节点,然后单击 Edit ...
- 在可用模块 中选择
java.xml.ws
模块,然后单击 → 按钮
- Go to Project > Properties: Java Build Path, tab Libraries
- Select the JRE > Is modular node and click Edit...
- In Available modules select the
java.xml.ws
module and click the → button
这篇关于在eclipse中添加java.xml.ws模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!