Definition of a multi-module Java 9 project in Eclipse

I will try the Java 9 Jigsaw module system (I have no experience with modules yet) and would like to use it to manage classes in my project, but this is confusing.

According to this article, it should be possible to have several modules in one project. I made a new project in Eclipse Oxygen (supported by Java 9) with the same structure as shown in the article. But Eclipse constantly tells me that I should not have more than one module-info.javain the project.

I really don't know how to tell Eclipse that it should use “multi-module mode”. And I really would be grateful not to create a new project for each individual module.

It works:

enter image description here

Is not:

enter image description here

- :

enter image description here

Eclipse? jmod. JAR ?

, IDE ( , IDE, , ?) , .

+8
1

Eclipse , (, Java).

, , Java OSGi/ Eclipse, / . Maven, , , . , . Eclipse , .

Eclipse 2019-03 (4.11) 20 2019 (. Eclipse 518445). JAR , (-m), (. ).

+7

Source: https://habr.com/ru/post/1693201/


All Articles