Java modules, introduced in Java 9, are not interpreted as modules by PreEmptive Protection™ DashO™. DashO treats them as standard JAR files and does not update or use the information in module-info.class.
Activate Module Support
To enable module support:
- Open the Config Editor and open your project.
- Navigate to the Properties tab.
- Select New.
- Add the
MODULE_EXPORTS_DETECTIONproperty. - Set
MODULE_EXPORTS_DETECTIONtotrue. - Save your changes.
When module support is enabled, DashO:
- Displays modules in the panels.
- Does not rename module exports.
- Compiles and copies
module-info.classinto the output directories.
Configure Module Inputs
Configure each Java module as its own DashO project. Each module must have its own .dox file.
If the module-info contains a requires directive, navigate to Input > Support to add the other input modules.
Configure Module Exports
DashO does not rename the exports specified in module-info.
Place anything that you want DashO to obfuscate in a package that is not exported.
Use exports to prevent packages from being renamed.
Obfuscate Modules
DashO does not obfuscate module-info.class.
When you obfuscate a module, DashO copies module-info into the obfuscated output path.
Module Options
Use the Input > Options to remove copying the module-info into the obfuscated output path.
Limitations
DashO has the following limitations for Java module support:
- DashO doesn't support flattening the module hierarchy. Use Maintain Hierarchy for now.
- DashO doesn't support using multiple modules as one input. Use one DashO project for each module.
- DashO doesn't support renaming packages in
module-info.class. Use exports with directives that contain class names. - The
PROVISIONAL_MODULE_SUPPORTproperty is deprecated and will be removed in a later release.