WHEN COREL BOUGHT WordPerfect for almost $200 million from the Novell
Corporation in the mid 1990s, nobody would have thought that in a matter of
months they would have been giving away the source code free. However, when
Corel ported WordPerfect to Java and released it as a beta product, a simple
program called Mocha1 could quickly and easily reverse engineer, or decompile,
significant portions of Corel's Office for Java back into source code.
Decompilation is the process that transforms machine-readable code into
a human readable format. When an executable, a Java class file, or a DLL is
decompiled, you don't quite get the original format; instead you get a type of
pseudo source code, often incomplete and almost always without the comments.
But often what you get is more than enough to understand the original code.
The purpose of this book is to address an unmet need in the programming
community. For some reason, the ability to decompile Java has been largely
ignored even though it is relatively easy for anyone with the appropriate mindset
to do. In this book, I would like to redress the balance by looking at what tools
and tricks of the trade are currently being employed by people who are trying to
recover source code and those who are trying to protect it using, for example,
This book is for those who want to learn Java by decompilation, those who simply
want to learn how to decompile Java into source code, those who want to protect
their code, and finally those who want to better understand Java bytecodes and the
Java VIrtual Machine (JVM) by building a Java decompiler.