views:

795

answers:

6

Is there any maintained Open-Source Java Decompiler?

  • Dava seems to be a thesis project rather than a programming tool.
  • JReversePro shows signs of activity but has had no release since 2002
  • JODE has had no release since 2004
  • dcompiler has had no release since 2002
  • javap only shows assembly-level code
  • Soot is not really a decompiler
  • Fernflower is maintained but not open source (yet?)
  • Java Decompiler (JD) is not open source
  • DJ Java Decompiler is not open source
  • Cavaj is not open source
  • jad is not open source, and it is dead
+1  A: 

http://java.decompiler.free.fr/

it supports Java5

01
It is not open source. Not released under any license that would look a bit open. Just a copyright notice, and a notice saying it is free for use under some conditions.
Nicolas Raoul
The licence of JD must be clarified, but I do not have time to do it...
Emmanuel Dupuy
@Emmanuel JD is a nice tool, I am sure a lot of distributions would include it and make it popular, if it were open source. The algorithm is nice, in particular inner classes, and it uses the original local variable names, both areas where fernflower performed less well (uses var1 var2 etc, and does not generate any source for the inner classes, for the same class file). I maintain a few open source projects, so if you need help with licensing I would be very glad. Since you don't want JD to be included in commercial products, I think GPL would be a safe choice :-)
Nicolas Raoul
+5  A: 

Would jode not be appropriate because even though there hasn't been a release since 2004, what language features have been added since then that wouldn't be able to be decompiled?

Looking on wikipedia, as long as the Java 5 features (generics, annotations et al) are supported, I don't think the class file format has have changed since then.

Hope this helps (although I am fully aware that I have answered a question with a question!)

James B
It seems that SVN contains changes that have never been released. The last time a developer has been seen on the forum was in January 2006, more recent questions are left unanswered. Also, a bad sign is that no Linux distribution is offering packages (except Arklinux years ago).
Nicolas Raoul
@Raoul, I concur, not a good sign....However, given the language features chart, are there any other options released for jdk 1.5?...@Pilgrim's answer of the fernflower project looks promising and it looks like it handles generic types etc. (although not-so-promising is its <1.0 version number, but I guess thems is the breaks in the case...)
James B
A: 

You can try to contact the author of http://www.reversed-java.com/fernflower/

It is an analytical decompiler and a very good one. The author wanted to release the code under a GPL compliant license in the near future, so if you ask him, probably he will release it. Latest news on the website are from August 2009.

tulskiy
This decompiler is really a good one : each time JD fails, I try it.
Emmanuel Dupuy
A: 

Hi Nicolas,

what do you need the source code for? Unfortunately I can't release it under GPL right now, because there are still some legal questions to be solved. However if you are representing a well established company or an R&D institute, an exception would be possible.

As for the current project status: over the last months I have completely rewritten the core of the decompiler, along with fixing quite a lot of bugs and improved performance. I hope to release a binary stand-alone version in the next time, provided my other projects won't monopolize me.

P.S. Sorry, the above refers to Fernflower of course. I'm the author of it.

Stiver
Hi Stiver! First of all, thanks so much for your great tool! I don't really NEED the source code, but any company would be more reassured to use an open source product, rather than a product that can disappear if its owner decides. Also, it could be included in Linux distributions to make it easier to find by users. Right now, all Linux distributions lack a good decompiler.
Nicolas Raoul
Couldn't you just run the decompiler over the decompiler's class files?
JUST MY correct OPINION
@JUST It is a joke right? Decompiling classes does not transform a proprietary product into an Open Source product. See http://www.opensource.org
Nicolas Raoul
A: 

Hello Stiver

I am a big fan of your work but your site seems to be down, I hope this isn't more than an upgrade or system maintenance. I think your site need to be preserved let me know if I can help with server space, processor power, etc.

Databold
A: 

Depending on your goals, look into soot. Soot provides Java decompilers that breaks Java down into an intermediate language closer to the byte code level. The advantage is that you can always modify and recompile versus many of the other decompilers that don't always generate compilable code.

Jim Rush