Skip to content

A small application to demonstrate the Java Platform Module System

License

Notifications You must be signed in to change notification settings

nipafx/demo-jpms-monitor

 
 

Repository files navigation

↗️ This README only covers one section of the demo. The master branch contains more information.

Missing Transitive Dependency

During compilation transitive dependencies are allowed to be missing unless they are exposed with the transitive keyword. Three modules are involved (only the dependencies are shown):

module monitor.rest {
	requires monitor.statistics;
}

module monitor.statistics {
	requires transitive monitor.observer.alpha;
}

module monitor.observer.alpha { }

The modules are compiled in the order alpha, statistics, rest and just before rest gets compiled, alpha is removed from the mods folder (only in compile.sh). Because rest depends on statistics, which exposes alpha, the compiler gives an error:

error: module not found: monitor.observer.alpha
1 error

Interestingly enough, though, if the transitive keyword is removed, compilations works just fine because all the modules rest can read are observable.

About

A small application to demonstrate the Java Platform Module System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published