Simpler GUI for Jad, The Java Decompiler.
I naturally customized it to:
jad -o -s java -lnc -d%TEMP% %1
"C:\Program Files\TextPad 5\TextPad.exe" %TEMP%.\%~n1.java
Changed extension to java so that textpad does syntax highlighting; added -lnc so that jad outputs the original line numbers as comments and I can trace the exceptions I get
(after a few questions from people i'm editing this post:)
You will need to download jad and extract the exeutable to somewhere on your path, say C:\windows (or c:\winnt). Then create a new .cmd file, paste the above into the .cmd file, and put it somewhere. Then rightclick any .class file you can find, choose "Open With..."->"Choose Program"->"Browse..." and find the cmd file you created (don't forget to check the "Always use this program"). This way, any .class you'll double-click will decompile and open in textpad.
Inspired by your method, I developed a Linux version.
ReplyDelete====================================
#! /bin/sh
if [[ ! -z "$1" ]] ; then
jad -b -ff -o -s java -d/tmp $1
b=${1##*/}
f=/tmp/${b%.class}.java
echo $f
if [[ -f $f ]] ; then
gedit $f
fi
else
echo "Usage: jad.sh class-file"
fi
====================================
DJ Java Decompiler comes with jad.
ReplyDeletesince the original jad site is down i've put a link to jad.exe here http://dl.getdropbox.com/u/1748643/jad.exe
ReplyDelete