O'Reilly logo

Java EE 7 Performance Tuning and Optimization by Osama Oransa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the javap tool to understand micro-optimizations

The javap tool is one of the JDK tools used to disassemble class files. The benefits of using this tool is to understand how the compiler deals with our code in case we have doubts about some of the micro-optimization techniques.

The syntax of the tool is as follows:

javap [options]  <classes>

We can add many classes and separate them using spaces. The most important options are as follows:

  • The method has one flag that specifies that the method access is public (ACC_PUBLIC)
  • -l: This option is to print line and local variable tables
  • -public: This option is to show only public classes and members
  • -protected: This option is to show only protected and public classes and members
  • -package: This option is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required