In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you what the common JVM mechanisms are, which are concise and easy to understand, which can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
JVM mechanism
1. Java source code compilation mechanism:
one. Analyze and input to the symbol table (ParserAndEnter):
Lexical analysis com.sun.tools.javac.parser.Scanner: converts a code string into a token sequence.
Parsing the com.sun.tools.javac.parser.Parser:Token sequence generates an abstract syntax tree.
Enter into the symbol table com.sun.tools.javac.comp.Enter: the symbol that appears in the class enters the symbol table of the class itself.
two. Annotation processing (AnnotationProcessing)
It is used to handle the user-defined annotation, and then proceed to the ParserAndEnter step again.
three. Parsing and generating class files (AnalyseandGenerate)
A sequence of semantic analysis is carried out based on the abstract syntax tree, and after the analysis is completed, the class file com.sun.tools.javac.jvm.Gen is generated.
Second, class loading mechanism (work responsibility and workflow of class loader subsystem):
one. Load: finds and loads the binary bytecode, using two elements to identify a loaded class: the fully qualified name of the class + ClassLoader instance ID.
two. Link: Verify-format check ensures the correctness of the imported class-> prepare (Prepared)-- allocate memory space for class variables and initialize default values-- > Resolve-- convert symbolic references of imported classes to direct references.
three. Initialize: performs initialization of static initialization code, constructor code, and static properties in the class.
ClassLoader parent delegation model:
BootstrapClassLoader--$JAVA_HOME/jre/lib/rt.jar (great grandfather)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.