The easiest way to create a PreEmptive Protection™ DashO™ project is to use the New Project Wizard. The wizard examines your application and determines appropriate settings for protecting your application. To start the wizard, go to File > Project Wizard.
Library
When you select Library in the Wizard, it will ask you for the location of the .jar
or directory that contains the library, as well as the location of the JDK that DashO should use to resolve Java runtime classes (See Include JDK).
The wizard will examine the library and determine dependencies that will be needed at runtime or for obfuscation purposes. You can add additional jars as inputs to be obfuscated or as runtime support jars. Java modules (.jmod
) can also be added to the list of support libraries. The missing classes list shows classes that are referenced by your library but were not located.
Next, the wizard will ask about the entry points in the library. The wizard will show the entire library as an entry point along with any special classes or methods that are used as entry points.
The wizard will also ask about annotations used to decorate classes, methods, and fields in the code and will suggest potential annotation-based Entry Point rules that you could enable. Enable an annotation entry point if you are familiar with the annotation and believe that code elements that are decorated with these annotations should be preserved.
Additionally, the wizard will present a checkbox that enables automatic generation of Entry Point rules based on annotations used for Hibernate. Checking the box will set the following rules:
- Prevent any classes annotated with
javax.persistence.Entity
from being renamed or removed. - Prevent any of the following members of classes annotated with
javax.persistence.Entity
orjavax.persistence.Embedded
from being removed:- Fields
- Getters (0-parameter methods with names beginning with
get
oris
) - Setters (1-parameter methods with names that begin with
set
)
Finally, the wizard asks where you want to save the resulting project file.
If you choose a name that already exists, DashO will ask if you want to replace the file. If you choose to save over the existing project, your new settings will be saved, and a backup will be created of the old project.
Desktop App
When you select Desktop App in the Wizard, it will ask you for the location of the .jar
that contains the application, as well as the location of the JDK that DashO should use to resolve Java runtime classes (See Include JDK).
The wizard will examine the application and determine dependencies that will be needed at runtime or for obfuscation purposes. You can add additional jars as input to be obfuscated or as runtime support jars. Java modules (.jmod
) can also be added to the list of support libraries. The missing classes list shows classes that are referenced by your application but were not located.
Next, the wizard will ask about the entry points of the application. If the jar's manifest included a Main-Class
attribute it will be listed as an entry point. In addition, the wizard will show the special classes or methods that could also be used as entry points. DashO uses these entry points to determine unused items that will be removed from the obfuscated output. You can select as many entry points as you wish to have DashO follow, but you should always select at least one.
The wizard will also ask about annotations used to decorate classes, methods, and fields in the code and will suggest potential annotation-based Entry Point rules that you could enable. Enable an annotation entry point if you are familiar with the annotation and believe that code elements that are decorated with these annotations should be preserved.
Additionally, the wizard will present a checkbox that enables automatic generation of Entry Point rules based on annotations used for Hibernate. Checking the box will set the following rules:
- Prevent any classes annotated with
javax.persistence.Entity
from being renamed or removed. - Prevent any of the following members of classes annotated with
javax.persistence.Entity
orjavax.persistence.Embedded
from being removed:- Fields
- Getters (0-parameter methods with names beginning with
get
oris
) - Setters (1-parameter methods with names that begin with
set
)
Finally, the wizard asks where you want to save the resulting project file.
If you choose a name that already exists, DashO will ask if you want to replace the project.
If you choose to save over the existing project, your new settings will be saved, and a backup will be created of the old project.