Understanding Java Byte Code

前端 未结 6 2304
长发绾君心
长发绾君心 2021-01-30 15:05

Often I am stuck with a java class file with no source and I am trying to understand the problem I have at hand.

Note a decompiler is useful but not sufficient in all si

6条回答
  •  甜味超标
    2021-01-30 15:30

    To view bytecode instruction of class files, use the javap -v command, the same way as if you run a java program, specifying classpath (if necessary) and the class name.

    Example:

    javap -v com.company.package.MainClass
    

    About the bytecode instruction set, Instruction Set Summary

提交回复
热议问题