Thursday, January 05, 2006

Simpler GUI for Jad, The Java Decompiler

Jad is the fastest java decompiler, available open source.. However it doesn’t come with a GUI. It is a command line tool. There are also GUI tools which internally use jad, and then decorate the code and show it in a graphical window.

Instead of going for a GUI tool, it is easier to write a dos-batch file, which will decompile the java class file, and opens them on your favorite text editor, say notepad/textpad.

Here is the script

===jadOpen.bat===
@echo off
jad -o -d%TEMP% %1
"C:\Program Files\TextPad 4\Textpad.exe" %TEMP%.\%~n1.jad
===============

Now associate class files, to open with this bat file by default, using windows program association. So now double clicking a class file will open in textpad with source code.

4 comments:

Andrea said...

I've been looking for java decompiler program for many hours. And didn't found something satisfy me. But yours is the best. Bravo.. Thanks a lot

JJ said...

Thanks a lot for the tip, is very useful !

Pete McKinstry said...

Great tip. Thanks.

skoser said...

It works only if the class file is not in a directory containing any spaces!

Recommended Blog Posts