在Myeclipse下查看Java字节码指令信息
Usage:
1) Window -> Show View -> Other -> Java -> Bytecode
to see bytecode of current Java editor/ Class file view. The automatic build for projects should be enabled in order to see generated class files. If "Link with editor" is on, then any selection in Java editor will be followed with selection of appropriated bytecode label, and vice - versa. Note: this bi-directional selection could only works, if your bytecode contains source lines/local variables information. Check your compiler setings, if you are not sure that your compiler generates debug information. If "show raw bytecode" is off, than local variable names will be shown instead of indexes, full qualified names replaced with simply class names, and primitive type abbreviations decoded to readable names. If "show current element only" is on, then only bytecode of current field/method node will be shown (if cursor is placed inside field/method name or body). 2.1) Select two *.class/*.java files -> right click -> Compare with -> Each Other Bytecode 2.2) Select one *.class/*.java file -> right click -> Compare with -> Another Class Bytecode to compare bytecode of selected class files. Compare works also for *.class files included in any referenced *.jar library. "Toggle ASMifier mode on/off" button on both Bytecode Outline and Compare View shows ASMifier java code, that generates selected bytecode. More information about how to use ASMifier you can find here. Note: if ASMifier mode is "on", then selection of java code cannot be folowed by selection of appropriated bytecode instruction, and vice - versa; the "show raw bytecode" action is also meaningless. 3) Window -> Show View -> Other -> Java -> Bytecode reference to see reference documentation to selected bytecode instruction in the bytecode view. This documentation is taken from "Java Virtual Machine" by Jon Meyer & Troy Downing Copyright (c) 1997 by O'Reilly & Associates, and provided with permission of O'Reilly Media, Inc. Packaging, cleanup, reformatting and XSL transformation completed by Eugene Kuleshov (eu@javatx.org). 4) Help -> Help contents -> JVM Instruction Reference to see the entire bytecode reference documentation, provided with BCO plugin.
|