Mocha, the Java Decompiler


In 1996, Hanpeter van Vliet released a beta version of a Java decompiler named Mocha, and an obfuscator named Crema. A controversy erupted and he temporarily withdrew Mocha from public distribution.

I have no sympathy for the people who opposed the release of Mocha. It is just a tool and is not inherently "bad" or "wrong". Attempting to ban tools like Mocha to prevent reverse engineering of software is like trying to ban socket sets to prevent reverse engineering of automobiles. Disassemblers and decompilers for other languages have been available for years, and have many legitimate uses.

Sad news about the author

I've been informed that Hanpeter died of cancer on December 31, 1996, at the age of 34.

If you find Mocha useful, you might consider making a donation to the American Cancer Society, or to other organizations sponsoring cancer research. Yahoo has a list or organizations.

Note that I have no affiliation with any of these organizations, nor am I related to Hanpeter.

Where can I get Mocha?

The readme.txt file in the Mocha distribution offers this license:

The distribution archive (file "") may be distributed freely, provided its contents ("" and this file, "readme.txt") are not tampered with in any way.

I am pleased to be able to make the Mocha distribution available under those terms: (121K, Friday, 02-Nov-2001 16:37:04 MST)

The file has been downloaded successfully from this web site 12908 times between August 27, 1996 and September 3, 1997.

Borland attempts to retroactively modify Mocha license!

On August 19, 1997, I received an email message from Eric Pesik of Borland International ordering me to cease and desist from distributing Mocha. Borland apparently believes that they own exclusive rights to Mocha, in direct contradiction of the license granted by the author.

I have no intention of complying with this order, and have sent an email reply to Mr. Pesik explaining this.

I recommend that anyone who is able to do so should put a copy of the unmodified file "" on other web or FTP sites in full compliance with the license. If you do so, please let me know, and I will add a link to your site above.

Are there other Java decompilers?

JavaWorld published a review comparing Mocha to two other early Java decompilers, DejaVu and WingDis. More information on early java decompilers can be found in the Java Decompiler HOW-TO by Alavoor Vasudevan.

Where can I get Crema?

Due to restrictions in the Crema license agreement, I am unable to provide it.

Crema was integrated into Borland's JBuilder product. Presumably Borland has fixed bugs and/or added features.

Several other obfuscators are available:

Douglas Low has written a technical paper "Protecting Java Code via Code Obfuscation".

Technical Support for Mocha and Crema...

... is not available from me. Sorry. I've only just started playing with Java, and haven't even tried to use Mocha yet. But I when I heard about Mocha I thought it could be a very cool and useful tool. Perhaps people on Usenet might be willing to offer assistance.

Last updated May 20, 2007

Copyright 1996-2001, 2005, 2007 Eric Smith

hacker emblem
Best Viewed With Any Browser Valid HTML 4.01! Valid CSS!

check now

check now