문제

I have binary of a java program say foo.class. Is it possible that I count the number of instructions in that class file ? or do I have to have the source code to count the number of instructions.

도움이 되었습니까?

해결책

Just disassemble the class using javap. The -c option

...prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the Java Virtual Machine Specification

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top