Zelix KlassMaster

Zelix KlassMaster Frequently Asked Questions

Version 1.0.2

  1. Why wont Zelix KlassMaster run?
  2. Does Zelix KlassMaster run under JDK v1.0.2?
  3. Does Zelix KlassMaster support JDK v1.1?
  4. Will Zelix KlassMaster run in UNIX, in an Apple OS or using the Microsoft SDK 2.0?
  5. Does Zelix KlassMaster's Unobfuscate reverse it's Obfuscate?
  6. Why don't all names change when I obfuscate or unobfuscate?
  7. Wont string encryption slow down my code and make it bigger?
  8. When I change a method name in one class, why do some methods in other classes also get renamed?
  9. When changing a method name, why do I get the message "New name clashes with a method in Class name" when the class mentioned doesn't seem to be related to the class that defines the method?
  10. Why wont it let me change package names?
  11. After being obfuscated why does my code get the runtime errors "VerifyError" or "NoClassDefFoundError" or "Can't find class Classname"?
  12. Are there classes that Zelix KlassMaster can't reliably process?
  13. When I load some classes why do I get the "Class Load Warnings" screen?
  14. When I load some classes why do I get the "Class Load Errors" screen?
  15. What options should I use when obfuscating my classes?
  16. What can I do if I get an "insufficient memory" error?
  17. Why does Zelix KlassMaster run so slowly?

Answers

Q1. Why wont Zelix KlassMaster run?

There could be a number of problems.
  1. You cannot run Zelix KlassMaster using Java 1.0.2 or lower.
  2. Zelix KlassMaster will not run with verification switched on.
  3. The file klassmaster.jar must be in your classpath or be unjarred (jar -fx klassmaster.jar) into a directory that is in your classpath.
  4. Zelix KlassMaster may not run on your operating system. See the answer to Q4.
If you are not getting a useful error message, try running with the -verify and -verbose switches. As stated above, Zelix KlassMaster will not run with the -verify switch but you may get some clues as to why it wont run when verification is switched off.

Q2. Does Zelix KlassMaster run under JDK v1.0.2?

No. Zelix KlassMaster requires JDK 1.1 to run. Of course it can still load and process JDK 1.0.2 bytecode.

Q3. Does Zelix KlassMaster support JDK v1.1?

Zelix KlassMaster recognizes Inner Classes and optionally retains Inner Class information. It has been successfully tested on Java 1.1 applications and applets.

Q4. Will Zelix KlassMaster run in UNIX, in an Apple OS or using the Microsoft SDK 2.0?

Zelix KlassMaster is written entirely in Java 1.1 and technically should run on any platform that supports a 1.1 Virtual Machine. However differences in the file systems and GUIs can cause problems. It has only been tested on Also Zelix KlassMaster will not run if you use the Microsoft SDK for Java 2.0. This problem is being investigated.

Q5. Does Zelix KlassMaster's Unobfuscate reverse it's Obfuscate?

No. Obfuscation irreversibly removes the original meaningful names. Unobfuscation simply makes names legal and readable and removes ambiguity. Also, unobfuscation doesn't reverse string encryption.

Q6. Why don't all names change when I obfuscate or unobfuscate?

There are a number of reasons why all class, field or method names don't change when you obfuscate or unobfuscate.

Q7. Wont string encryption slow down my code and make it bigger?

Encrypted strings are decrypted at runtime using code that has been added to the class. This means that the class will run slower and will be bigger. How much slower and bigger depends upon the design of the class. If all of the class's string literals are coded as static final variables (e.g. static final String s = "Hello World;") then the decryption will be done only once at the time of class initialization which greatly reduces any performance degradation. The bytecode size increase is typically only significant for trivial classes. It is recommended that you measure the impact on your classes.

Q8. When I change a method name in one class, why do some methods in other classes also get renamed?

When you change a method name, Zelix KlassMaster automatically changes all method names that are polymorphically linked to that method. So overridden methods in superclasses and overriding methods in subclasses must also be renamed. If the method is an implementation of an interface method then the method in the interface and the corresponding methods in all classes that implement that interface must also be renamed. So the change can ripple across to different branches of the class hierarchy.

Q9. When changing a method name, why do I get the message "New name clashes with a method in Class name" when the class mentioned doesn't seem to be related to the class that defines the method?

The answer to Q8 explains how a method name change can ripple across to different branches of the class hierarchy. So Zelix KlassMaster must check that the new name wont clash with existing names in these other classes. A name clash occurs if the proposed new signature

Q10. Why wont it let me change package names?

Zelix KlassMaster can only change package names if you are changing all class names. Change your obfuscate or unobfuscate option settings.

Q11. After being obfuscated why does my code get the runtime errors "VerifyError" or "NoClassDefFoundError" or "Can't find class Classname"?

This will happen if you obfuscate your bytecode using Java illegal identifiers or adding heavy corruption, and you have run you code with verification switched on. (Verification is on for applications run with the -verify switch and is always switched on for Applets.) You cannot use illegal identifiers or add heavy corruption if your classes must run after being verified.

Alternatively, you will get such messages even when not runing with verification if you have renamed your highest level package qualifiers so that class names are Java illegal when fully qualified. For example a class named com.1.0 will cause no problems when running without verification but a class named 1.1.0 will cause problems.

Q12. Are there classes that Zelix KlassMaster can't reliably process?

Some classes cannot be reliably obfuscated, unobfuscated or have any names changed. Examples are classes that hardcode package, class, field or method names in a string and then When Zelix KlassMaster loads a class that it might not be able to process reliably it reports the fact using the "Class Load Warnings" screen. See the answer to Q13 for more detail.

Q13. When I load some classes why do I get the "Class Load Warnings" screen?

Some classes cannot be processed reliably. (See the answer to Q12 for more detail.) When Zelix KlassMaster loads a class that it might not be able to process reliably it reports the fact using the "Class Warnings Screen". You get the "Class Load Warnings" screen whenever a loaded class contains a call to one or more of the following methods: Zelix KlassMaster may still be able to process classes that contain some of the above method calls. For example, calls to Class.getName() are often made for debugging purposes. In these cases, the user must look at the way the call is used to determine if the class can be reliably processed.

Q14. When I load some classes why do I get the "Class Load Errors" screen?

Some obfuscators add corrupt information to bytecode files in the hope of confusing or crashing decompilers. Zelix KlassMaster detects this corrupt information and reports the fact using the "Class Load Errors" screen. Corrupt Local Variable Table and Inner Class information is automatically removed.

Q15. What options should I use when obfuscating my classes?

Generally, don't select the "keep inner class information" and do select "remove line number tables". This will reduce the size of your bytecode. The "encrypt string literals" option is generally safe provided you have no public or protected final String fields that may be accessed from outside the packages you are obfuscating. However, string encryption does make your bytecode somewhat larger and slower (see the answer to Q7).

If you are obfuscating an applet then select the "legal identifiers" option but don't select the "add corrupt symbolic entries" with "heavy corruption" option. Applet bytecode is fully verified before being run. Otherwise it should be safe to change all package, class, field and method names.

If you are obfuscating an application that doesn't have to run with verification switched on then you can get extra protection by using illegal identifiers and by adding heavy corruption. However, if you are using illegal identifiers and you are changing package names then make sure that your top level package qualifier(s) wont be changed. Class names must always be Java legal when fully qualified. Otherwise it should be safe to change all lower level package names and class, field and method names.

If you are obfuscating a package that will be used by third parties as a class library then you should

Please note that whatever options you choose it remains your responsibility to fully test or retest your classes after they have been processed by Zelix KlassMaster.

Q16. What can I do if I get an "insufficient memory" error?

Zelix KlassMaster holds a lot of information in memory for each class that it loads. So, the more classes you load and the more complicated those classes are the more memory you need. If Zelix KlassMaster tells you that there was insufficient memory to load your classes or if it crashes with an OutOfMemoryException then you can do one of the following:
  1. Give java more memory to work with by using the -mx??m option where ?? represents the number of megabytes. (For example, the option -mx48m gives java 48 megabytes of heap space.)
  2. Install more physical memory.
It is not recommended that you make use of virtual memory (by giving java more memory to work with than is physically installed.) Performance will be unreasonably slow.

Q17. Why does Zelix KlassMaster run so slowly?

There are a number of reasons Zelix KlassMaster may run slowly.
  1. Your computer may have insufficient real memory installed. If your computer has to use virtual memory performance will be very poor. You will notice that the hard disk is being very heavily utilized.
  2. You are obfuscating or unobfuscating while viewing a very large class or method. This results in reduced performance due to the overhead of updating the class or method details.
  3. You are using the Sun JDK 1.1.4 for Windows. This version of the JDK has a bug in it's AWT List component that can reduce the performance of Zelix KlassMaster markedly. If you can, use the JDK 1.1.3 instead.

Documentation Table of Contents
Copyright © 1997 Zelix Pty Ltd (ACN 078 740 093)