Provide Best Programming Tutorials

Generate Byte Code

Many times, we need to understand what a compiler is doing under the hood. How java statements we are writing, will be reordered and executed. Also, we need to see the byte code for learning purpose also, I do it seldom.


  1. Javac [Your class name] will create [Your class name].class

  2. javap -c [Your class name].class > bytefile.bc

  3. Open bytefile.bc

Look at example below, bytecode is demo as below

Leave a Reply

Close Menu