Hi, my name is Brian. I like sunsets, long walks on the beach, puppies, and de-compiling Java code. If you have similar interest, please read on. On the other hand, if you're not a Java programmer, this post might not be for you.
So of all the cool tools out there, JAD is, without a doubt, my absolute favorite...and it's not even close. One of the beautiful things about Java is that the byte-code interpreted by the JVM can be reverse-engineered into source code. JAD, or JavA Decompiler, is a tool for doing just as the name implies: decompiling byte code into source. But so what? Why would this possibly be useful? Well, here's a list of just a few things that I've done by de-compiling code:
-
Found software bugs
-
Saved about 5 weeks of hassle with BEA support by pointing them to the line of source code that is causing a bug
-
Re-compiled bug fixes back into code as a band-aid solution to a problem (Note that this probably voids any/all support agreements that you've ever had with any one)
-
Understood how/why a piece of software works like it does (I.e. "Why is Analytics deleting all a bunch of historic information when I run a specific job...there's no document on it")
-
Found cool/un-documented software features (Again...no support, but playing around with stuff is fun)
-
This one is my favorite: Long ago, for "Bring your kids to work day", I was on the hook for talking to a bunch of 12 year olds about programming. So I de-compiled a Ms. Pacman applet, found the code that does collision detection, modified it to not work, and re-compiled the new code back in. The net result was a Ms. Pacman who could run through ghosts, and a bunch of kids learning how "If" statements work.
-
Also, this guy I know might have one time de-compiled a VI plugin for Eclipse to take out the license key check. Don't worry though, I quickly told him how he was a bad boy, and he's been on the straight and narrow ever since.
OK, sorry for the rambling there, but just wanted to give you a flavor of the stuff you can do by de-compiling code. More generally though, if you're a programmer at heart, it's always a good idea to look at source code, just to understand how things work. Of course there are fringe benefits too:
-
Fellow portal geeks marvel over how "smart" you are because you "de-compiled" the portal and found some problem.
-
You'll get to complain about what idiots the people who wrote the code are
-
Men will want to be you
-
Women will want to be with you
So, let's look at a quick example, shall we? JAD is a text-based utility, so get ready to fire-up your DOS prompts and/or Shell windows. I'm writing this post on a PC, so my examples will be through DOS, but UNIX folks, just make the normal DOS->*NIX changes, and you'll be fine.
Let's assume that I've been trying to get a piece of proprietary software to run for a while now, and every time I start it up, I get a stacktrace like the following:
Now, you could argue that I should know better than to purchase a piece of software named, "Broken", but I'd argue right back that you're getting in the way of my example.
Want to see JAD in action? Join me after the link for all the details!





