请教java VM的启动参数 (200分)

  • 主题发起人 主题发起人 takou
  • 开始时间 开始时间
T

takou

Unregistered / Unconfirmed
GUEST, unregistred user!
java VM的启动参数中有两个不知道什么意思:
java -hotspot
java -classic
他们启动两种类型的jvm
请问这两种类型的jvm有什么区别?
谢谢!
 
好像是hotspot可以局部编译成机器码
还有garbage collection algorism有一些区别,好像是hotspot现回收
最近创建(使用时间最短的)的对象。
具体的问题好像有些professional在javaword上发过一些文章,你可以去查一查
 
对不起,能不能再清楚的给出资料的连接或发邮件给我。
最好是中文的在sun.java.com上的文档,看的人头大。
 
Java 2 SE 1.2 Classic VM Java 2 SE 1.2 Classic VM(JIT)
包括如下部分,没有运行时环境
Beans rmi Swing Net Text Security Util ,Io, Lang
Java HotSpot™
Server VM Java HotSpot™
Server VM (Server Compiler)
包括如下部分:
HotSpot Runtime、SQL、 rmi、 Swing 、Net 、Text、 Security 、Util 、Io 、Lang 、Beans
Java HotSpot™
Client Java HotSpot™
Client VM(Client Compiler)
包括如下部分:
HotSpot Runtime、rmi 、Swing、 Net 、Text、 Security、 Util 、 Io 、Lang 、 Beans 、SQL
JAVA系统缺省是启用HOTSPOT VM
 
zhuny:
Server Compiler与Client Compiler有什么区别?
顾名思义
Server Compiler是应用服务器用的吗?
Client Compiler是一般用的吗?
 
我想应该可以这么理解
从如下文挡中有一段二者的性能比较
<<Java HotSpot&amp;#8482;
Virtual Machine: The Foundation for Performance on the Java&amp;#8482;
Platform>>
&amp;#8226;
Java HotSpot Server VM
– Java HotSpot 1.0, 2.0
– Flat out performance
&amp;#8226;
Java HotSpot Client VM
– Part of J2SE&amp;#8482;
1.3 (Kestrel)
– Small memory footprint
– Fast startup time
– Fast interactive response
 
The Java 2 SDK, Standard Edition, contains two implementations of the Java
virtual machine (VM).
Java HotSpot Client VM
The Java HoSpot Client VM is the default virtual machine of the Java 2 SDK and
Java 2 Runtime Environment. As its name implies, it is tuned for best performance
when running applications in a client environment by reducing application start-up
time and memory footprint.
Java HotSpot Server VM
The Java HotSpot Server VM is designed for maximum program execution speed for
applications running in a server environment. The Java HotSpot Server VM is invoked
by using the -server command-line option when launching an application, as in
java -server MyApp
Some features of Java HotSpot technology, common to both VM implementations,
are the following.
Adaptive compiler - Applications are launched using a standard interpreter,
but the code is then
analyzed as it runs to detect performance bottlenecks,
or "hot spots". The Java HotSpot VMs compile those performance-critical portions
of the code for a boost in performance, while avoiding unnecessary compilation of
seldom-used code (most of the program). The Java HotSpot VMs also usesthe adaptive
compiler to decide, on the fly, how best to optimize compiled code with techniques
such as in-lining. The runtime analysis performed by the compiler allows it to eliminate
guesswork in determining which optimizations will yield the largest performance benefit.
Rapid memory allocation and garbage collection - Java HotSpot technology provides for
rapid memory allocation for objects, and it has a fast, efficient, state-of-the-art
garbage collector.
Thread synchronization - The Java programming language allows for use of multiple,
concurrent paths of program execution (called "threads"). Java HotSpot technology
provides a thread-handling capability that is designed to scale readily for use in large,
shared-memory multiprocessor servers.

 
zhuny:谢谢,我会为你加分,但是我对-classic 选项的意义还不太清楚。
好像是启动vm到调试模式吗?
 
我个人认为, -classic 起来的就是一个调试环境。
因平时少注意这些,也许理解有偏差。
 
多人接受答案了。
 
后退
顶部