About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« Happy Anniversary To Me! One year of blogging today... | Main| Known Limitations of Notes and Domino 6.x »

OK... Java decompilers are freaking cool!

Category Software Development

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!

Comments

Gravatar Image1 - Um... I promise not to decompile yours...

Gravatar Image2 - LOL! But now you've decompiled, aren't you tempted to make the applet work right? i.e. move the bg colour to an applet parameter?


Gravatar Image3 - Actually, that's high on my list of enhancements...

Gravatar Image4 - grrr. Yet another thing I don't like about Java. Now, I've got to go and buy an "Obfuscator" just so I can actually OWN and PROTECT my own source code for a PRODUCT that I want to sell.

Now, not only do I have to go to the trouble of learning this stupid language, surround myself with three or four hundred bucks worth of books, spend two weeks emersed in actual code (real programmers do the work on paper first) syntax hell -- but when I finally get a working multi-threaded servlet that runs reliably and performs the way I want, I have to "OBFUSCATE" it so some twerp doesn't come along and decompile it and figure out what makes the thing worth buying, then sell it or give it away.

gggrrrrrrr........

Gravatar Image5 - Poor Andrew And to think just a week ago he was so happy with himself for having gotten the thing figured out. And unlike LS, he can't write an include statement in a script library to keep the critical parts off the target system altogether.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...