当前位置:网站首页>2:第一章:认识JVM规范1:JVM简介;
2:第一章:认识JVM规范1:JVM简介;
2022-07-05 22:53:00 【小枯林】
说明:
(1)JVM简介,认识JVM;
目录
1.JVM概述;
(1)虚拟机可以看成是一个计算机系统,只是它是有软件模拟的;
(2)在真实物理机上,主要是由CPU执行指令集;;;在JVM中,通过软件模拟指令集;
……………………………………………………
(1)右边部分:我们编写了java源代码(.java文件),然后通过java编译器(如javac等命令,或者通过IDEA等工具)把其编译成java字节码(.class文件);
● 这个过程就是开发过程;
(2)左边部分:当我们编译成.class文件后,这个Java平台运行期环境(即JVM)会通过类装载器(Class Loader),把字节码文件(.class文件)装载到虚拟机中去;
● 自然,装载的时候,会对字节码文件进行校验和认证(比如,校验是否符合虚拟机规范、格式是否正确等);
● 在装载字节码文件的时候,还会装载java类库(指那些必须要由虚拟机体提供的一些基本的、必要的支撑,比如:基本的数据类型、if-else和for循环的处理、基本的java安全的处理,JNI跟一些硬件的处理等等);
(3)左边中间部分:当我们装载完成后,虚拟机就会把这些交给Java解释器;
● Java解释器就会去解释字节码并执行;其中也会涉及即时编译器(JIT);
● 运行期比这个图中展示的要复杂的多;;;运行环境首先要做内存分配,然后执行.class字节码(就会用到字节码执行引擎),也需要垃圾回收,考虑并发处理,安全处理;
(4)左边下部分:如果需要和硬件或者操作系统交互的话(比如通过JNI与外界交互),就会出虚拟机了;即java程序和虚拟机交互、虚拟机和操作系统交互、然后通过操作系统与硬件交互;
2.JVM主要功能;
3.虚拟机是“Java平台无关性”的保障;
(1)在Windows系统上、Linux系统上等不同系统上,Java虚拟机是不同的;
(2)我们开发的同一套程序,把其编译成.class文件后;
● 把它扔到Linux系统上,就有Linux版的JVM去运行;;;把它扔到Windows系统上,就有Windows版的JVM去运行;
● 这样一看,其实Java并不是真的与平台无关;只不过我们不同平台上的不同的虚拟机帮我们屏蔽了而已;
边栏推荐
- Shell: operator
- Ieventsystemhandler event interface
- [secretly kill little buddy pytorch20 days] - [Day2] - [example of picture data modeling process]
- Hj16 shopping list
- The introduction to go language is very simple: String
- [digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]
- Global and Chinese markets of industrial pH meters 2022-2028: Research Report on technology, participants, trends, market size and share
- Three. JS VR house viewing
- Double pointer of linked list (fast and slow pointer, sequential pointer, head and tail pointer)
- 513. Find the value in the lower left corner of the tree
猜你喜欢

Selenium+Pytest自动化测试框架实战

利用LNMP实现wordpress站点搭建

MoCo: Momentum Contrast for Unsupervised Visual Representation Learning

并查集实践

透彻理解JVM类加载子系统

TCC of distributed solutions
![[digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]](/img/b4/af689abb3ad4e25988f2d17152406e.jpg)
[digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]

Arduino measures AC current

Event trigger requirements of the function called by the event trigger

Paddle Serving v0.9.0 重磅发布多机多卡分布式推理框架
随机推荐
Error when LabVIEW opens Ni instance finder
利用LNMP实现wordpress站点搭建
Overview of Fourier analysis
Arduino measures AC current
派对的最大快乐值
Data type, variable declaration, global variable and i/o mapping of PLC programming basis (CoDeSys)
Lesson 1: serpentine matrix
Marginal probability and conditional probability
d3dx9_ What if 29.dll is missing? System missing d3dx9_ Solution of 29.dll file
C Primer Plus Chapter 9 question 10 binary conversion
Thoroughly understand JVM class loading subsystem
Global and Chinese markets for welding products 2022-2028: Research Report on technology, participants, trends, market size and share
Starting from 1.5, build a micro Service Framework -- log tracking traceid
Un article traite de la microstructure et des instructions de la classe
Roman numeral to integer
Nacos installation and service registration
[speech processing] speech signal denoising and denoising based on MATLAB low-pass filter [including Matlab source code 1709]
openresty ngx_lua正則錶達式
CorelDRAW plug-in -- GMS plug-in development -- new project -- macro recording -- VBA editing -- debugging skills -- CDR plug-in (2)
如何快速理解复杂业务,系统思考问题?



