$ find classes mr9
classes
classes/module-info.class
classes/p
classes/p/Hi.class
classes/p/internal
mr9
mr9/module-info.class
mr9/p
mr9/p/Hi.class
mr9/p/internal
mr9/p/internal/Bar.class
$ jar --create --file mr.jar -C classes . --release 9 -C mr9 .
entry: META-INF/versions/9/p/Hi.class, has a class version incompatible with an earlier version
entry: META-INF/versions/9/p/internal/Bar.class, contains a new public class not found in base entries
invalid multi-release jar file mr.jar deleted
Updated: the empty package in the above example is irrelevant. The key is that jar tool should allow to add a public class in a concealed package in a versioned entry of a modular JAR.