Inside the JVM(1)
来源:互联网 发布:mysql自动递增 编辑:程序博客网 时间:2024/05/16 07:31
机遇和挑战:
platform independence, security, and network-mobility.
JVM:
The Java Virtual Machine is an abstract computer.
A Java Virtual Machineís main job is to load class files and execute the bytecodes they contain.
native methods are the connection between a Java program and an underlying host operating system.
The Class Loader Architecture
The primordial class loader loads trusted classes, including the classes of the Java API, usually from the local disk.
Classes loaded by different class loaders are in different name-spaces and cannot gain access to each other unless the application explicitly allows it.
不同的classloader有不同命名空间,不同classloader装载的类不可互相访问。
class文件是虚拟机的“机器语言”
API是虚拟机的一部分
Precisely because the Java Virtual Machine and Java API are implemented specifically for each particular host platform, Java programs themselves can be platform independent.
security manager?
JAVA编程语言
One of the most compelling reasons for using Java as a language is that it can enhance developer productivity.
提高了生产力!!
The main disadvantage is slower execution speed.
缺点是较慢的执行速度
面向对象,使得代码重用度高,比起c,很明显;和c++比,面向对象特性较为相似,但是java不允许直接操纵内存。
Java程序员不用担心错误的类型,不用手工回收内存。
Java有数组边界的检查,C++没有
null引用的使用会得到异常,而C++使用空指针往往造成程序崩溃。
Javaís extra run-time housekeeping--array bounds checking, type-safe
reference casting, checking for null references, and
garbage-collection--will cause your Java program to be slower than an
equivalent C++ program.
When running on a virtual machine that interprets bytecodes, a Java
program may be 10 to 30 times slower than an equivalent C++ program
compiled to native machine code.
When running on a virtual machine that interprets bytecodes, a Java
program may be 10 to 30 times slower than an equivalent C++ program
compiled to native machine code.
可以在安装的时候把java编译成本地代码。——install-time compiled
Architectural Tradeoffs ——架构的权衡
It is suitable for solving
problems that involve networks and has utility in many problem that donít
involve networks, but its architectural tradeoffs will disqualify it for
certain types of jobs.
HOT SPOT
- Inside the JVM(1)
- inside jvm在线读
- Inside JVM体系结构详解
- Inside the Windows Vista Kernel: Part 1
- Inside the C++ Object Model chapter 1
- Inside the C++ Object Model 笔记1
- Inside The C++ Object Model :note (1)
- Inside the Linux Packet Filter(REPOST)
- JVM - Concept and Lifetime (From book "Inside the Java Virtual Machine")
- Inside JVM 学习日志【一】
- Inside the Native API
- Inside the Whale
- Inside the Native API
- Inside the Linux scheduler
- Inside the blackbox -- notes
- inside the c++ object
- uva_12069_Robots inside the Labyrinth_TLE
- 转:深入了解JVM-----Inside JVM读书笔记
- XP不显示桌面运行应用程序
- 看“程序员的十大谎言”之感
- stuts2框架的上传与下载实现
- C# file 文件操作
- JAVA截取文件的后缀
- Inside the JVM(1)
- fedora 问题整理
- $(document).ready()详解
- artDialog 弹出框组件 功能很强,很暴力。不感独享
- macd指标分析 交易代码 c++
- jQuery选择器总结
- 最新OpenCV2.4.6与VS2010开发环境搭建
- struct file与struct inode
- 用Java打开网页