TR-Java-lecture02(JVM体系结构).ppt

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Java程序设计 Java Programming Spring 2009 Chapter 3: JVM Architecture JVM Architecture JVM Working Principles JVM Function Modules Java Virtual Machine (JVM) an abstract computing machine uses software to simulate a real computer Like a real computing machine, it has an instruction set and manipulates various memory areas at run time interprets Java byte code into machine code Write Once, Run Anywhere! What is the JVM A software simulation of a hypothetical computing machine that runs Java bytecodes (Java compiler output). The Java Virtual Machine allows Java code to be portable between various hardware and OS platforms. Java虚拟机(JVM)- Java Virtual Machine,它是通过在实际的计算机上用软件模拟各种计算机功能模块虚构出来的一个计算机。Java虚拟机由5个部分组成:一组指令集、一组寄存器、一个堆栈、一个无用垃圾内存单元收集器和一个方法区域。? The Java Virtual Machine JAVA 虚拟机 - JVM 为什么使用Java虚拟机? Java语言最重要的特点就是可以在任何操作系统中运行 - 跨平台特性。 Java编译器生成与平台无关的字节码,作为虚拟机的输入,Java解释器得到字节码后,对其进行解释,使之能在不同的平台下运行。 不同的操作系统有不同的虚拟机。 Java虚拟机的基本原理 Java虚拟机屏蔽了与具体操作系统平台相关的信息,使得Java语言编译程序只需生成在Java虚拟机上运行的目标代码(字节码),就可以在多种平台上不加修改地运行。 Java虚拟机在执行字节码时,实际上最终还是把字节码解释成具体平台上的机器指令执行。 Java Run-Time System JVM consists of class loader class verifier runtime interpreter JVM Components JVM Components: Class loader loads classes into memory; The JVM needs a class, so it asks the ClassLoader, by name, for this class, and the ClassLoader attempts to return a Class object that represents the class. JVM Components: Class verifier Unsafe elements in byte code: Forge illegal pointers; Contain illegal bytecode instructions ; Contain illegal parameters for bytecode instructions; Overflow or underflow the program stack; Perform illegal casting operations; Attempt to access classes, fields or methods illegally. JVM Components: Class verifier ensures that class files are legal prior to execution Pass 1 - File Integrity Check ; Pass 2 - Class Integrity Check ; Pass 3 - Bytecode Integrity Check ; Pass 4 - Runtime Integrity Check . JVM Components: runtime interpreter interprets (executes) Java byteco

文档评论(0)

考试教学资料 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档