当前位置:网站首页>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并不是真的与平台无关;只不过我们不同平台上的不同的虚拟机帮我们屏蔽了而已;
边栏推荐
- Week 17 homework
- Multi sensor fusion of imu/ electronic compass / wheel encoder (Kalman filter)
- 2.13 summary
- CorelDRAW plug-in -- GMS plug-in development -- new project -- macro recording -- VBA editing -- debugging skills -- CDR plug-in (2)
- leecode-学习笔记
- Global and Chinese market of diesel fire pump 2022-2028: Research Report on technology, participants, trends, market size and share
- Déterminer si un arbre binaire est un arbre binaire complet
- Metasploit(msf)利用ms17_010(永恒之蓝)出现Encoding::UndefinedConversionError问题
- Nacos installation and service registration
- Global and Chinese markets for welding products 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
![[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]

Event trigger requirements of the function called by the event trigger

Matlab smooth curve connection scatter diagram

Week 17 homework

Tensor attribute statistics

视频标准二三事

2022.02.13 - SX10-30. Home raiding II

【Note17】PECI(Platform Environment Control Interface)

Error when LabVIEW opens Ni instance finder

Paddle Serving v0.9.0 重磅发布多机多卡分布式推理框架
随机推荐
利用LNMP实现wordpress站点搭建
VOT toolkit environment configuration and use
Global and Chinese markets of industrial pH meters 2022-2028: Research Report on technology, participants, trends, market size and share
February 13, 2022 -5- maximum depth of binary tree
Leetcode daily question 1189 The maximum number of "balloons" simple simulation questions~
3 find the greatest common divisor and the least common multiple
Nangou Gili hard Kai font TTF Download with installation tutorial
Hcip day 12 (BGP black hole, anti ring, configuration)
并查集实践
Hj16 shopping list
一文搞定垃圾回收器
傅里叶分析概述
VIM tail head intercept file import
openresty ngx_lua正則錶達式
Arduino 测量交流电流
透彻理解JVM类加载子系统
My experience and summary of the new Zhongtai model
openresty ngx_ Lua request response
npm ELECTRON_ Mirror is set as domestic source (npmmirror China mirror)
Vision Transformer (ViT)



