There always comes that time, when you’re debugging a Java application, when you get to that compiled code inside that open source jar that you added to make your life easier. Whether there’s an actual bug or you’re just trying to understand some behavior or weirdness you’re getting from calling this third party API, sometimes it just helps to see the source. If you’re using Eclipse you’re in luck, things just got easier, well they’ve been easy for awhile, but if you weren’t aware of jad they just got easier. If you download and unzip the most recent version of JAD, Java’s fast decompiler, and add the appropriate Jadclipse plug-in for your version of Eclipse, set a little configuration and your workspace will decompile compiled code automagically. No more ugly class outlines, just raw source code. This is by far one of the essential tools a Java developer should have in their tool kit, just like Firebug for a Web developer. Here are some step by step instructions to get you going, of course I’m assuming you’re already using eclipse and have an existing workspace.
The biggest time-saver I’ve stumbled upon in Eclipse is the Open Resource Shortcut. Under the Navigate menu is the Open Resource command, shortcut Ctrl+Shift+R on Windows, or Commad+Shift+R on Mac, which opens a window that allows you to type a search for any file that exists in your workspace, in your search you can use the ? to replace a single character or * to replace an entire string, the search is amazingly fast. If you’ve worked on a project for a long time you know the names of all of your php, jsp’s, classes, xml files, and properties, and digging through the folder structure in the Navigator and Project Explorer views can be time consuming and annoying. I’ve trained my self to use it so much that IDE’s that don’t have a comparable feature, like JDeveloper, annoy me to no end.