Eclipse issue with java 9 and maven

I installed Version: Oxygen.1a Release (4.7.1a) Build code: 20171005-1200 , supporting Java 9.

With the proposed configuration on eclipse.ini

-vm
C:\Program Files\Java\jdk-9\bin\javaw.exe
--add-modules=ALL-SYSTEM

I developed java 9 (modularity java 9) code to test dependency injection as a pure Java project from eclipse, but when I have integrated Maven it works from eclipse. I am systematically getting the following error.

Error initializing loading layerjava.lang.module.FindException: module com.my.module.hello.test not found

the only solution was to add VM arguments

--module-path target/classes;../my-module-api/target/classes;../my-module-it/target/classes --module com.my.module.hello.test/com.my.module.hello.Reflection

enter image description here

Indeed, if you add the verbose parameter to the Vm arguments, which I can see at boot time

... [0.694s] [info] [class, load] java.lang.NamedPackage source: jrt:/java.base [0.697s] [info] [class, load] com.my.module.hello.MyHello : :/C:/Users/212442540/ -/--PRJ/-/// [0.698s] [] [, ] java.lang.module.ModuleDescriptor $$ Lambda $24/2114889273 : java.lang.module.ModuleDescriptor...

"-module-path", .

. Eclipse . . ..

enter image description here

modpath

enter image description here

, , Eclipse java 9 , , maven.

Configratin enter image description here 1

eclipse .

:

manually

2

eclipse :

after saving 3

, eclipse reset , maven.

+6
1

, M2Eclipse.

Eclipse. 526838 - Eclipse maven

Java:

  • > > ...
  • :

    : C:\windows\system32\cmd.exe

    : ${workspace_loc:/my-module}

    :

    /C java
    -p target/classes;../my-module-api/target/classes;../my-module-it/target/classes
    -m com.my.module.hello.test/com.my.module.hello.Reflection
+4

All Articles