简体   繁体   中英

In eclipse, how can i see the assembly translation of the java code?

我的意思是处理器的intel组件?

If you want to see the native code generated (at runtime) by the JIT compiler, then there are a series of JVM flags that will print the assembly code as it is generated.

They are included in this listing - search for "PrintAssembly" .

Note that these options need to be prefixed with "-XX:" in the java command line. Refer to the java manual page for details.

You won't get anything like that. Java is compiled to ByteCode.

Java-code is translated to bytecode . Then the JVM takes the bytecode and executes it. So I think you are out of luck.

If you want the bytecode - see javap . It ships with the JDK and disassembles a class file. As @arjan noted, Eclipse shows such information when you double-click a class.

http://java.decompiler.free.fr/

but I guess that's extra easy to be found oneself.

If with "assembly translation" you mean the byte code (the output from Javac, JDT, etc) then the answer is really simple: find a .class file and double click on it.

This will show you the byte code in human readable mnemonics.

Enter the output folder - usually "bin" - in the Navigation perspective. There you can see all your class files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM