




已阅读5页,还剩27页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
JavaJava程序设计程序设计 Java Programming Spring, 2009 1成都信息工程学院成都信息工程学院 计算机系计算机系 Course Information nInstructor: lName: Tang, Rong(汤蓉) lTel:lE-mail: lMy Webpage: 教师主页 汤蓉 /Js/PFP/S7L/Default.htm 2 2 Department of Computer Science lLab:12 学时; lExperiment:6学时. 先修课程包括:数据结构、面向对象程序设计等 3 3 Department of Computer Science lFriday, Section 5 and do not leave your PC unattended while you are logged in any time it instead contains bytecodes the machine language of the Java Virtual Machine (JVM). lThe Java launcher tool then runs your application with an instance of the Java Virtual Machine. 2323 Department of Computer Science & TechnologyDepartment of Computer Science & Technology Java Virtual Machine (JVM) nan abstract computing machine nuses software to simulate a real computer nLike a real computing machine, it has an instruction set and manipulates various memory areas at run time ninterprets Java byte code into machine code Write Once, Run Anywhere! 2424 Department of Computer Science & TechnologyDepartment of Computer Science & Technology What is the JVM nA software simulation of a hypothetical computing machine that runs Java bytecodes (Java compiler output). nThe Java Virtual Machine allows Java code to be portable between various hardware and OS platforms. nJava虚拟机(JVM)- Java Virtual Machine,它是通过在实 际的计算机上用软件模拟各种计算机功能模块虚构出来的 一个计算机。Java虚拟机由5个部分组成:一组指令集、一 组寄存器、一个堆栈、一个无用垃圾内存单元收集器和一 个方法区域。 2525 Department of Computer Science & TechnologyDepartment of Computer Science & Technology The Java Virtual Machine 2626 Department of Computer Science & TechnologyDepartment of Computer Science & Technology JAVA 虚拟机 - JVM n为什么使用Java虚拟机? Java语言最重要的特点就是可以在任何操作系统中运行 - 跨平台特性。 Java编译器生成与平台无关的字节码,作为虚拟机的输入,Java解释器得 到字节码后,对其进行解释,使之能在不同的平台下运行。 不同的操作系统有不同的虚拟机。 nJava虚拟机的基本原理 Java虚拟机屏蔽了与具体操作系统平台相关的信息,使得Java语言 编译程序只需生成在Java虚拟机上运行的目标代码(字节码),就 可以在多种平台上不加修改地运行。 Java虚拟机在执行字节码时,实际上最终还是把字节码解释成具体 平台上的机器指令执行。 2727 Department of Computer Science & TechnologyDepartment of Computer Science & Technology Translation of Java to machine code 2828 Department of Computer Science & TechnologyDepartment of Computer Science & Technology Translation of Java to machine code nA two step process Step 1: Compile source code to Java byte code. lByte code is a standard intermediate-level language. lInput: Java code in one or more files ending in .java lOutput: Byte code in one or more files ending in .class Step 2: Interpret Java byte code on a particular machine lThe interpreter converts each byte code statement to the specific type of machine code and then runs that machine code. 2929 Department of Computer Science & TechnologyDepartment of Computer Science & Technology Some Features of Java nPortable/platform independent nThe Java Virtual Machine nAutomatic Garbage Collection nNo pointers or pointer arithmetic nMultiple inheritance replaced by interfaces, eliminates complexities of multiple inheritance 3030 Department of Computer Science & TechnologyDepartment of Computer Science & Technology 可移植性-Portable/platform independent n程序的可移植性:指程序不经过修改而在不同的硬 件或软件平台上运行的特性。 n可移植性包括二个层次:源代码级和二进制级的可 移植性。 C、C+仅有一定的源代码级的可移植性。 Java编译器生成与平台无关的字节码,只要安装了Java 运行系统,其程序就可以在任意的处理器上运行 3131 Department of Computer Science & TechnologyDepartment of Computer Science & Technology Types of Java Programs nApplication Standalone Java program that can run independent of any Web browser nApplet Java program that runs within a Java-enabled Web browser nServlet Java software
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年功能性食品市场消费者行为与产品创新策略研究
- 工业互联网平台IPv6技术升级2025年智能制造设备部署方案报告
- 聚焦2025年功能性食品市场:消费需求与产品创新方向解析
- 2025年中国高性能内衬离型纸行业市场分析及投资价值评估前景预测报告
- 2025年农村新能源在农村地区智慧金融服务技术创新与应用研究报告
- 2025年新能源汽车轻量化车身轻量化碰撞安全性能模拟分析报告
- Module 5 Unit1第一课时 说课稿 外研版八年级英语上册
- 环保设备制造业市场竞争态势分析报告:2025年产品创新路径
- 2.4 用因式分解法求解一元二次方程 教学设计 2023-2024学年北师大版九年级数学上册
- Module 5 Unit 1 He is playing the suona,but the phone rings.(教学设计)-外研版(三起)英语六年级下册
- 基于Logistic的海南省居民购买银行理财产品的影响因素研究
- 城市社区地震安全韧性评估技术规范
- 江苏省南京市联合体2024-2025学年八年级上学期期中数学练习试卷
- 部编版(2024)三年级道德与法治上册第12课《生活离不开规则》教学课件
- 插花花艺师(高级)技能认证考试复习题及答案
- 山东省济南市历城第三中学2024-2025学年上学期九年级10月月考数学试题(无答案)
- 2024年大学英语应用能力考试A级试卷及答案
- 《非道路移动工程机械二手设备评估通则》
- 凯撒大帝课件
- DL5190.5-2019电力建设施工技术规范第5部分:管道及系统
- 水刷石外墙清洗方案
评论
0/150
提交评论