Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Would like to take a look at the byte code size of a method to see how far it is to the maximum length(64KB). How could I do that?
一种选择是使用javap -c YourClassName- 这将向您显示每种方法的每条指令的字节偏移量。
javap -c YourClassName
或者,要以编程方式执行此操作,我强烈怀疑BCEL或ASM会帮助您。