In an ideal world, decompilation would probably be unnecessary, except when learning how other people who don't...
like to write good documentation implemented a certain feature. In the real world, however, there are often situations where a direct reference to the source code can be the best, if not the only, solution. Here are some of the reasons to decompile:
- Recovering the source code that was accidentally lost
- Learning the implementation of a feature or trick
- Troubleshooting an application or library that does not have good documentation
- Fixing urgent bugs in third-party code for which no source code exists
- Learning to protect your code from hacking
In this chapter from the book Covert Java: Techniques for Decompiling, Patching, and Reverse Engineering, by Alex Kalinovsky, you'll learn:
- How to determine when to decompile (page 13)
- What the best decompilers are (page 14)
- How to decompile a class (page 16)
- What makes decompiling possible (page 22)
- Potential problems with decompiled code (page 23)
Don't forget to take the quick quiz at the end of the chapter to test your reading comprehension.