IntelliJ - module not found:

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

With sourceCompatibility = 10 in it builds/runs tests, but with sourceCompatibility = 11 it shows module not found:

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.

annotation-api library, since this annotation does not exist in the package bundled in the JRE (module See also https://youtrack.​jetbrains. But Intellij highlights the javax.annotation.Resource import in red suggesting adding the deprecated module. Please, see the screenshots (just in case; sorry for my paint skills:)): The issue: `requires` stuff I'm adding in the module descriptor. The new dependency in the pom.xml:

Add to gradle

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

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

Hello, since I upgraded to 2018.1 all my JAXB annotations are breaking with error "Package is declared in module java.xml.bind, which is not in the module graph" still using the same JDK after the IntelliJ upgrade, so I'm not sure if this is a new restriction or what. Didn't find what you were looking for? IntelliJ does not find a main class in my Java application project. The project was cloned from a git repository so had no run configuration. I go to Edit Configurations, add a new Application template, go to Main class: and it says "No matches found in project".

Could you please verify that you don't have '--add-modules', '' in your build.gradle, because this module was removed in JDK11, but is still needed for JDK 10.

The Maven module I've just migrated works fine: dependency in order not to use the deprecated platform module. In Intellij i have the same message 'module not found: com.jdojo.address'. I've added a tree of the folder if that can help, i've left the other previous project 'com.jdojo.intro'. – MrSir Aug 4 '17 at 15:59

The provider is hard-wired in There must be some difference in the class loader order that I am not able to find. I built the IDEA project from the pom.xml that works with Eclipse and I use the same \javax​\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3  Use --processor-module-path compiler option (for java 9 and later): assume that the specified path is a module path: a path of JARs or directories containing packaged Java modules. In order to be discovered and run from the module path, an annotation processor should be packaged as a Java module and registered with the ServiceLoader in the

But then sometimes all the testing fails.. and no javax.annotations can be found . project from pom.xml, make sure all the dependencies are detected, module (e.g. -upgrademodulepath java.annotations.common-1.2.jar);. IntelliJ IDEA 14 Ultimate has this feature, and it worked perfectly without breaking my Java module detection like db42's answer did. – Patrick M Oct 12 '15 at 15:30 after doing this it is not even showing suggestions to built in modules to which previously it was there – Bharat Aug 29 '17 at 13:43

xml is reimported it stops working. Tried to update the dependencys to the latest version. Tried following: 1. In settings as java compiler  The java and resources folders are not recognized as Test Sources Root and Test Resources Root. Hence the java classes show a red circle like icon and not able to run the java files from the editor. This happens only in this module. Other modules are fine. I tried deleting the project (including .idea folder) and reimport and it still doesn't work.