Java Modules
Java Modules, introduced in Java 9, will not be interpreted as modules by PreEmptive Protection™ DashO™; they will be treated as standard jar files.
DashO will neither update nor use the information in module-info.class
.
Activate Module Support
- Open the
DashO > Properties
and add propertyMODULE_EXPORTS_DETECTION
and set it totrue
. - This will display modules in the panels.
- This will automatically not rename any module exports.
- This will automatically compile and copy the
module-info.class
into the output directories.
Module Inputs
- Configure each Java module as its own DashO project. Each module will have its own dox file.
- If the
module-info
has a requires directive, use the DashOInput > Support
to add the other input modules.
Module Exports Directive
- DashO will automatically "not" rename any of the
module-info
exports. - Anything you want obfuscated must go into a package that is not exported.
Obfuscating Modules
- DashO doesn't obfuscate the
module-info.class
. - Use exports to not rename packages.
- DashO will copy the module-info into the obfuscated output path.
Module Options
- Use the
Input > Options
to remove copying the module-info into the obfuscated output path.
Future Support
- DashO does not support flattening the module hierarchy yet. Use
Maintain Hierarchy
for now. - DashO does not support having multiple modules as one input. Use one DashO project per module for now.
- DashO does not support renaming packages in the
module-info.class
. Use exports with any directives with class names. - The
PROVISIONAL_MODULE_SUPPORT
is now deprecated property and will be removed in a later release.
Samples
Check out the DashO module example https://github.com/preemptive/dasho-samples/tree/master/java/multimod
.
- In this project note that there are two dox files. One for each module.
- This project shows an example of exporting a directory that isn't obfuscated and a private directory that is obfuscated.