OK... Java decompilers are freaking cool!
I know that Joe Litton has written about using java decompilers to see how things work in other peoples code. I know they exist, but until today I had never had reason (other than curiosity) to have to use one. Now I'm sold...
I was working at a client today, and one of the tasks is to update the 6.5 mail template with some of their custom code. One of the things they have is a mail quota gauge applet that shows the user how close they are to their size limit. While the Gauge.class file was available, the Gauge.java file was nowhere to be found. I searched all over the place online to find where the prior developer might have appropriated the code from. I found a similar program at SearchDomino, but it wasn't the same. All I needed to do was to change the background color to mesh with the new color scheme. What to do, what to do?
I decided that a decompiler might help. Using Google, I searched for, what else, java decompiler. The first hit was to a package called DJ Java Decompiler (http://members.fortunecity.com/neshkov/dj.html). Not having any experience with decompilers, I decided that it looked like a good choice. Man, it rocks!
I installed the program, fired it up, found the Gauge.class file I had exported, and clicked the Decompile button. Presto! There's the source code! I made the RGB color changes and saved the code. I then clicked on the Tools button, and guess what? You can recompile from the IDE! No command line interface! Recompiled the code, and it was clean. Moved it into the database to test, and it worked like a dream. I made a few more tweaks after that, but basically it was everything I wanted, and I didn't have to look at the help files once.
To make sure no one else had to repeat these steps, I saved the .java and .class files in a Page element along with instructions on what's going on. But I'm thinking that I want to have a decompiler package on all my workstations now. I'm sold!