Java Class-Level Protection
You can use the Class Level Protection tab to provide class-level protection for Java applications.
Class-level protection provides:
>An additional protection layer that blocks Java reverse-engineering tools (for example: decompilers).
>High performance (compared to method-level protection).
Class-level protection and licensing can be used exclusively or together with method-level protection. (The protection type Class level or Method level & Class level must be selected on the General tab.) Periodic background checks can be performed for whichever protection type (class-level, method-level, or both) you select for the application.
NOTE You can also use Sentinel LDK Envelope under Windows to provide class-level protection for Java applications that run on a 64-bit Linux Intel machine. For details, see Class-Level Protection for Linux Applications.
Using the Class Level Protection tab, you can:
>Select specific classes to protect and license (using the check box for each class).
>Assign Feature IDs to specific classes. (When assigning Feature IDs, click a row to select it. To select multiple rows, hold down the Ctrl key while you click each row.)
NOTE
In some cases, direct calls that use the Java class-level protection cannot work correctly. For example:
>The entry class is specified in the command line, for example:
java -cp <your class path> ${ENTRY_CLASS}
> The Java class-level protected .jar file is called by another unprotected .jar file.
To fix these, you can integrate the Java class agent in the Java class-level protected application.
1.Copy the sntljavaclsagent.jar from the installation package to the protected Java application directory that contains the Java class-level runtime library. Following are the default installation folders. Yours may be different.
•Windows: %ProgramFiles(x86)%\Thales\Sentinel LDK\Samples\Envelope\Java\agent
•Linux: Linux/Samples/Envelope/Java/agent
2.Add the sntljavaclsagent.jar to the command line while starting the Java application using -javaagent:sntljavaclsagent.jar, for example:
java -javaagent:sntljavaclsagent.jar -cp <your class path> ${ENTRY_CLASS}
java -javaagent:sntljavaclsagent.jar -cp <your class path> -jar ${ENTRY_JAR}
The fields and panes that are displayed on this page are described below.
Java Classes Available for Protection
A list of Java classes that are available for protection is displayed.
Actions that affect individual classes
Select an item's check box to protect it.
Actions that affect multiple classes or that affect the entire list
You can select or clear the check boxes for all classes in a package by selecting or clearing the check box in the appropriate entry within the hierarchy.
You can also select multiple classes by selecting multiple rows. Hold down the Ctrl key while you click each row. You can then select or clear the check box for all of them at once
Assigning Feature ID
By default, protected classes in the list are licensed using the global Feature ID listed at the top of the General tab. The literal Global is listed in the Feature ID column for each class.
You can assign a Feature ID to the selected classes, in addition to the global Feature ID assigned to the java executable. If the item is selected for envelope protection, this Feature is used for encryption and decryption. At run-time, the protected program searches for the assigned Feature ID in the Sentinel protection key.
You can assign a Feature ID for multiple classes at once by selecting multiple rows as described above.
NOTE If your application will be distributed with Sentinel HL Basic keys, you can use only the default Feature (Feature ID 0) to protect your application.
Related Topics
Defining Java Program Protection Details