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.

Duplicate Modules

Here, we create two artifacts claiming to contain monitor.observer.beta and place them into the same folder:

jar --create \
	--file mods/monitor.observer.beta-1.0.jar \
	--module-version 1.0 \
	-C classes/monitor.observer.beta .
jar --create \
	--file mods/monitor.observer.beta-2.0.jar \
	--module-version 2.0 \
	-C classes/monitor.observer.beta .

(Only in compile.sh, not with Maven.)

The next module-related command, compiling monitor.statistics, immediately fails:

error: duplicate module on application module path
  module in monitor.observer.beta
1 error

This happens even though monitor.statistics does not even use the duplicated module.

About

A small application to demonstrate the Java Platform Module System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published