Swing Problems Resulting from yGuard's Obfuscation Levels
TroubleshootingSummary
Using yGuard's highest level of obfuscation can lead to problems with Java Swing.
Description
The yGuard obfuscation process can be invoked with different settings for the 'naming-scheme' property. Using 'best', i.e., yGuard's highest level of name obfuscation, as the value for this property can generate very long names. In some cases, e.g., when such a long name replaces the name of a JFrame descendant, Java Swing crashes.
To avoid this problem, you can use yGuard's mapping feature to exclude certain classes from the obfuscation process, and give them predefined names instead.
<map>
<class name="com.yourcompany.yourapp.yourpackage.YourFrame" map="SillyNewNameForYourFrame"/>
</map>
Note that the package names might have to be fixed, too.
<package name="com" map="com"/>
<package name="com.yourcompany" map="mycompany"/>
<package name="com.yourcompany.yourapplication" map="myapplication"/>
<package name="com.yourcompany.yourapplication.yourpackage" map="dont/look/into/this/package"/>
Categories this article belongs to:
yGuard
Applies to:
yGuard: 1.3, 1.5
Keywords:
Swing - JFrame - obfuscation - level