Java bytecode Fast Track notes Posted in 2018-01-27 | Hits: 0 | Word count: | Read duration ≈ Principle of execution
Java files are compiled into Java bytecode files (i.e.. class files) by the compiler, which is the Java compilation process, and our Java Virtual machine executes bytecode files. Regardless of where the bytecode file comes from, which compiler compiles it, or even a handwritten bytecode file, it can execute the bytecode file as long as it conforms to the Java Virtual Machine specification.
Byte code Learning good text
- http://blog.csdn.net/shenhonglei1234/article/details/54861958
Idea Configuration Quick View Java bytecode
- HTTP://WWW.JIANSHU.COM/P/252F381A6BC4 Bytecode Basics Learning Notes
- http://ifeve.com/javacode2bytecode/more details
View bytecode (as an instance of the HelloWorld file)
- Javac–verbose view Run class is loaded with those jar files
javac –verbose HelloWorld.java
You can see what happens when the virtual machine compiles ...
- J
ava –verbose HelloWorld
You can see the jar package that is loaded when the virtual machine runs a program
More content View javac –help
commands
- JAVAP View byte code
First use JAVAP–HELP can see a variety of commands, each command what function, you can run to try ...
Here only Test javap –c
andjavap –verbose
javap –c HelloWorld
You can view the bytecode, where you can get information about various variables, etc.
But javap –verbose
you can see more clear information.
Simple principle of execution
iload_1
Plastic compression Stack
float_1
is a floating-point pressure stack
if_icmple 7
How to 1<=2 the value of the top parameter of the stack to the 7th row
- The FINAL modified variables we call constants, in the class file we identify as acc_final.
- Flags for static variables
flags: ACC_PUBLIC, ACC_STATIC
Java bytecode Fast Track notes