I am trying to port some outdated applications to the new modular Java 9 system in order to strengthen its encapsulation.
I start from the outside, believing that classes on the periphery will have the least external dependencies.
As expected, I announced the start of an open module:
module com.example.user {
exports com.example.user;
}
This instantly crashes the entire project (inside all classes) when suddenly every import for an external dependency is no longer resolved (causing more than 1k Java problems):
Import com.otherexample cannot be allowed
Unable to allow org.springframework import
and etc.
Local packages in one project com.example.price
continue to work - like java.util
etc.
Maven. (Eclipse project) "Classpath", JRE "Modulepath".
? , module-info.java
, pathpath ?
, , , , / , , . :
module com.foo.myapp {
requires guava;
}
, , Eclipse, module-info.java, :
spring-core-4.3.8.RELEASE.jar
:
requires spring.core;
Java, Eclipse:
spring.core
Maven:
[ERROR] module-info.java:[39,16] error: module not found: spring.core
... .