How to decompile a JNLP application

JNLP, or Java Network Launching Protocol, is a fancy way of starting Java Applications via Java WebStart.

To decompile such an application, start out by downloading the jnlp-file and open it up. In it you should find URLs to a list of JAR-files. Copy this list into a document, let’s call it “files”.

Run the following command on a linux box: while read line ; do wget $line ; done < files

This should grab all the JAR-files.

Now run this command to extract all the files: touch jars && ls | grep .jar > jars && while read line; do unzip $line -d $line-unpacked; done < jars

Finally, run this command to decompile the class-files, using the JAD decompilation tool: for LINE in $(find | grep .class); do ./jad -o $LINE; done

Note that this requires the JAD binary to be in the current working directory, and that it will overwrite any duplicate files without prompting.

There, now you can start looking through the code.