Java bytecode Fast Track notes

Source: Internet
Author: User

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
    1. http://blog.csdn.net/shenhonglei1234/article/details/54861958
      Idea Configuration Quick View Java bytecode
    2. HTTP://WWW.JIANSHU.COM/P/252F381A6BC4 Bytecode Basics Learning Notes
    3. http://ifeve.com/javacode2bytecode/more details
View bytecode (as an instance of the HelloWorld file)
    1. 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 ...
    2. Java –verbose HelloWorld
      You can see the jar package that is loaded when the virtual machine runs a program
      More content View javac –help commands
    3. 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 HelloWorldYou 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_1Plastic compression Stack
    • float_1is a floating-point pressure stack
    • if_icmple 7How 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 variablesflags: ACC_PUBLIC, ACC_STATIC

Java bytecode Fast Track notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.