Decompiling a Java Class

One of the most interesting aspects of Java is that it maintains quite a bit of information about the class in the compiled files. For example, each class file contains a list of the member variable names and method names, as well as references to other classes.

By mid-1996, Java had only been out for a year and already people were writing Java decompilers. A decompiler can take a class file and generate a Java source that performs the same operations as the class file. Not long after the appearance of Java decompilers, of course, came Java code obfuscators. An obfuscator changes class, method, and variable names to make it tougher to figure out what the class does.

Many thought that Java decompilers would pose a huge ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.