>Can you recommend a good Java Decompiler paid or free to decompile Java
>code?
>I am having issues using JAD for with some class files that have nested
>try-catch
>blocks and its just not stable.
for your options see http://mindprod.com/jgloss/decompiler.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
shuchalle@hotmail.com - 16 Mar 2006 15:58 GMT
Thank you for extensive list! I will have to try these one at a time to
see which one works on the class file
I have lost source for.
> Can you recommend a good Java Decompiler paid or free to decompile Java
> code?
> I am having issues using JAD for with some class files that have nested
> try-catch
> blocks and its just not stable.
Which version of JAD are you using ? I find 1.5.8f works perfectly well for my
applications, but of course -- like any decompiler -- it can get confused,
especially when the compiler(s) it targets is(are) updated more often than it
is itself.
You could give SourceAgain a try:
http://www.ahpah.com/products.html
Commercial, but there is a web-based evaluation facility. It still talks about
1.3 so I doubt if it's under very active development, but FWIW it did do a
somewhat better job of converting the appended code (compiled with JDK1.5,
default options) than JAD 1.5.8f.
You might also look at Soot, which includes decompilation facilities:
http://www.sable.mcgill.ca/soot/
Just don't expect any decompiler to work perfectly...
-- chris
========== test code ===========
public class Test
{
public static void
main(String[] args)
{
int i = -1;
try
{
try
{
i = throw2();
System.out.println("got i: " + i);
}
catch (NullPointerException npe)
{
System.out.println("caught NPE: " + npe);
}
finally
{
System.out.println("finished inner");
i = throw1();
}
}
catch (IllegalStateException ise)
{
System.out.println("caught ISE: " + ise);
}
finally
{
System.out.println("done (i is" + i + ")");
}
}
private static int
throw1()
throws IllegalStateException
{
throw new IllegalStateException("throw1");
}
private static int
throw2()
throws NullPointerException
{
throw new NullPointerException("throw2");
}
}
========================
shuchalle@hotmail.com - 16 Mar 2006 15:57 GMT
I am using JAD 1.5.8e2. I agree with you - I don't expect any
decompiler to work perfectly. I just need one to work on the a single
class file I lost the source for!!!
Thank you. I will take a look at your suggestions.