Class ModularJarArchiver

java.lang.Object
All Implemented Interfaces:
Archiver, FinalizerEnabled
Direct Known Subclasses:
JarToolModularJarArchiver

public abstract class ModularJarArchiver extends JarArchiver
Base class for creating modular JAR archives. Subclasses are required to be able to handle both JAR archives with module descriptor (modular JAR) and without ("regular" JAR). That would allow clients of this class to use it without prior knowledge if the classes they are going to add are part of module (contain module descriptor class) or not.

The class allows you to set the module main class (setModuleMainClass(String)), but if it is not set or it is set to null, then the Main-Class attribute of the JAR manifest is used (if present) to set the module main class.

Since:
3.6