The other day, I found myself needing to reverse engineer a java class. Some may wonder why, and the answer would be that this jar file composer must not have known about javadoc, and likes to write methods with lots of inputs and vague method parameter names. I thought that it wasn’t going to be such a bad deal because Eclipse has a great plugin called JadClipse that can decompile class files stuck in compiled jar file libraries. Little did I know, the maintainer of JadClipse swiftly left the planet circa eclipse 3.4 release, leaving everyone sorta hanging.
This led me down the road of trying to figure out how to get the whole thing working with older files and all that good stuff. Of course, the last time I used Jad was on a system I no longer have. Well, I tried the handy eclipse plugin system and diligently entered the eclipse 3.4 plugin that someone got sick of not having and wrote. I rebooted eclipse, and low and behold, the stupid thing wasn’t working.
You may now be thinking: “well most eclipse plugins work right out of the box”, and with that statement, you would be correct. This one however, did not.
I started brainstorming what it could possibly be, and a lot of ideas ran through my head such as: “maybe the new guy who took up the reigns of the Jadclipse plugin doesn’t know WTF he is doing, kinda like the guy who wrote this jar file”. A quick jaunt around the web proved this not to be the case, as lots of people claimed to have gotten this new Jadclipse 3.4 plugin working just fine. Next, “could it be user error”? Maybe I forgot to flip the bit that designates Jadclipse the new class file viewer, rather than the OOTB eclipse compiled class viewer, which is less than helpful in my situation. Of course, that wasn’t it.. Jadclipse duly installed itself and flipped its default .class file viewer setting.
Then the epiphany. Jad was a command line decompiler only back in the day. I didn’t have the command line decompiler installed, and the Jadclipse plugin simply uses the output of the jad command line decompiler and then reads the files generated into eclipse.
Simply locating a mirror of the jad decompiler, then placing it in the java path, I now had the command line decompiler working. I quickly checked to see if eclipse was now doing its magic and showing me the source, and it was.
So.. pro tip: if you can’t seem to get the JadClipse plugin working for versions of eclipse later than 3.4 (and probably any version of eclipse for that matter), make sure you have the old school jad decompiler in your path somewhere. You can tell if it is there by popping a command prompt and typing jad. Good luck!
Powered by Adsense Deluxe Revived