4

I created a very basic maven project:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.jotschi</groupId>
    <artifactId>test</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>9</source>
                    <target>9</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

It just has an de.jotschi.App main class and a /test/src/main/java/module-info.java file which defines and exports the module:

module test {
  exports de.jotschi;
}

If I run the App class within eclipse I see the following error:

Error occurred during initialization of boot layer java.lang.module.FindException: Module test not found

Eclipse: Oxygen.1 Release (4.7.1) + Java 9 Support for Oxygen

Java: 9+181

Jotschi
  • 3,270
  • 3
  • 31
  • 52
  • 3
    The Java 9 Support for Oxygen does not include patches for Maven support. Please try [Oxygen 1a.RC1](http://www.eclipse.org/downloads/index-developer.php?release=oxygen) instead. – howlger Oct 07 '17 at 13:43
  • Since I am able to do something similar in IntelliJ. I would guess that eclipse is not supporting the maven plugin configuration.. Not an exact duplicate but possibly the answer there states that you can wait until the release on 11.10.2017. https://stackoverflow.com/questions/46369792/why-wont-eclipse-oxygen-start-for-the-first-time – Naman Oct 07 '17 at 13:44
  • 2
    @nullpointer You're guessing wrong. – howlger Oct 07 '17 at 13:48
  • @howlger about the maven support or the duplicate? – Naman Oct 07 '17 at 13:49
  • 3
    @nullpointer both (Java support and Maven support are developed by different Eclipse projects and require different adaptations for Java 9) – howlger Oct 07 '17 at 14:00
  • 1
    I see this is still happening with oxygen 1a. Is anyone else getting the same error? Looks like maven support was not updated. – Amit Kumar Oct 11 '17 at 17:43
  • Yep. I also have issue with java 9, eclipse oxygen 1a and maven. Check this link [link]https://stackoverflow.com/questions/46741683/java-application-not-working-with-java9-and-eclipse/46755795?noredirect=1#comment80459408_46755795 [/link] – Basit Oct 16 '17 at 11:40
  • I'm using Eclipse version 4.7.3a but still having the same issue. What gives? – Arya May 14 '18 at 19:04

1 Answers1

8

The Java 9 Support for Oxygen does not include patches for the Eclipse Maven support.

Please wait for Oxygen.1a or test an Oxygen.1a release candidate (but note, there is a known Maven Java 9 issue in RC1 which has been fixed two days ago).


Update: Eclipse Oxygen 4.7.1a is now released. If you update Eclipse Oxygen with Java 9 BETA Support for Oxygen, uninstall Java 9 BETA manually (see Eclipse bug 526065).

howlger
  • 31,050
  • 11
  • 59
  • 99
  • **NOTE**: when updating to Oxygen.1a make sure that no traces of a previously installed BETA Patch feature remain (which would otherwise block the final release version of some plug-ins). – Stephan Herrmann Oct 15 '17 at 16:11
  • I'm using Eclipse version 4.7.3a but still having the same issue. What gives? – Arya May 14 '18 at 19:04
  • @Arya I'm not able to reproduce it with Oxygen.3a (= Platform/JDT 4.7.3a and m2e 1.8.3)? Are you sure [m2e](https://eclipse.org/m2e) is up to date and that you haven't run into bug 526065? – howlger May 15 '18 at 07:00