Query on usage of exclude-resources plugin

Sabari L Krishnamoorthy sabkrish at in.ibm.com
Tue Apr 25 07:37:25 UTC 2017


I was experimenting to use --exclude-resources plugin to remove .class 
files from modules.

While trying to exclude a single .class file using this plugin works (see 
point 1 below), but removal of all .class files from a package throws 
error (see point 2 below)

jdk-9/bin/jlink --module-path jdk-9/jmods/ 
--add-modules java.desktop --output ./trial

This is working and creating an custom image

jdk-9/bin/jlink --module-path jdk-9/jmods/ 
--add-modules java.desktop --output ./trial
Error: Packages that are exported or open in java.desktop are not present: 

jdk-9/bin/jlink --module-path jdk-9/jmods/ 
--exclude-resources=/java.desktop/sun/font/* --add-modules java.desktop 
--output ./trial
Error: java.lang.RuntimeException: Module java.desktop's descriptor 
returns inconsistent package set

These commands seem to throw different errors.

java -version of the build used:
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+157)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+157, mixed mode)

Is --exclude-resources expected to handle removal of .class files?   If 
yes, are the errors seen due to bug in the jdk?


More information about the jigsaw-dev mailing list