简体   繁体   中英

IntelliJ - module not found: java.xml.ws.annotation

Project has Gradle 5 (gradle-5.0-milestone-1), Java 11 (OpenJDK11) and latest IntelliJ Professional.

With sourceCompatibility = 10 in gradle.properties it builds/runs tests, but with sourceCompatibility = 11 it shows module not found: java.xml.ws.annotation

Note that If I run test task from Gradle it runs everything successfully but it only fails when running directly from IntelliJ (pointing on method, right click and run).

Does anyone have any idea what is going wrong here?

For those who run into similar problem. Removing .idea folder and reimporting whole project helped.

Add to gradle

compile group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1'
compile 'com.sun.xml.bind:jaxb-osgi:2.4.0-b180830.0438'
compile group: 'com.sun.xml.ws', name: 'jaxws-ri', version: '2.3.1', ext: 'pom'

compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.4.0-b180830.0438'

能否请您确认您没有'--add-modules', 'java.xml.ws.annotation'在你的build.gradle,因为这个模块是在JDK11删除,但仍需要JDK 10 HTTPS ://jaxenter.com/jdk-11-java-ee-modules-140674.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM