Hi, 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) 1) jdk-9/bin/jlink --module-path jdk-9/jmods/ --exclude-resources=/java.desktop/java/awt/image/renderable/ContextualRenderedImageFactory.class --add-modules java.desktop --output ./trial This is working and creating an custom image 2) jdk-9/bin/jlink --module-path jdk-9/jmods/ --exclude-resources=/java.desktop/java/awt/image/renderable/* --add-modules java.desktop --output ./trial Error: Packages that are exported or open in java.desktop are not present: [java.awt.image.renderable] 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? Thanks Sabari