Zelix KlassMaster - Documentation

Tools | Trim


Applications can often contain unused classes, fields or methods. This can happen if your application
  • includes a class library that it doesn't fully utilize,
  • contains general purpose utility classes that are not fully utilized.
Bytecode can also contain attributes that are not necessary for the running of your application. (Bytecode attributes are data structures that compilers place within the bytecode that they produce.)

The Zelix KlassMaster™ trim tool can reduce the size of your application by removing the unused classes, fields and methods and the unnecessary bytecode attributes. The magnitude of the size reduction depends upon the number of unused classes, fields and methods and unnecessary attributes present.

See below for more detail on the

Automatic handling of references in XML, manifest and JAD files

Text files such as XML, manifest and JAD files typically contain references to classes. If these files are contained within an archive that has been opened for obfuscation then Zelix KlassMaster™ will analyze them and automatically exclude the referenced classes from being trimmed.

Zelix KlassMaster™ can also automatically exclude some field names from being trimmed if they appear in certain tags within certain XML files. For example, fields appearing in a field-name tag in a META-INF/ejb-jar.xml file will be automatically excluded from being trimmed. However, the automatic exclusion of fields is not as comprehensive as the automatic exclusion of classes.


Once your classes are open, you may trim them at any time by selecting the Tools | Trim menu. The trim dialog consists of two windows.
Zelix KlassMaster - Selecting Tools | Trim

Documentation Table of Contents
Zelix KlassMaster - Java Obfuscator