Real'sHowTo AddThis Feed Button
Custom Search

Set the default JVM typeTag(s): Environment


If you type, in a Shell
> java -version
you get
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
The default JVM with a JIT (Just-In-Time compiler) for a "client" mode is used. The other available mode is "server".

From the Hot Spot FAQ at http://java.sun.com/docs/hotspot/HotSpotFAQ.html#compiler_types.

What's the difference between the -client and -server systems?

These two systems are different binaries. They are essentially two different compilers (JITs)interfacing to the same runtime system. The client system is optimal for applications which need fast startup times or small footprints, the server system is optimal for applications where the overall performance is most important. In general the client system is better suited for interactive applications such as GUIs. Some of the other differences include the compilation policy,heap defaults, and inlining policy.

Where do I get the server and client systems?

Client and server systems are both downloaded with the 32-bit Solaris and Linux downloads. For 32-bit Windows, if you download the JRE, you get only the client, you'll need to download the SDK to get both systems.

For 64-bit, only the server system is included. On Solaris, the 64-bit JRE is an overlay on top of the 32-bit distribution. However, on Linux and Windows, it's a completely separate distribution.

The default setting is defined the file jvm.cfg.

On Debian GNU/Linux with Sun Java 1.5.0, the file is in /etc/java-1.5.0-sun.
On Windows, it's in C:\Program Files\Java\jre1.5.0\lib\i386.

A content like

-client KNOWN
-server KNOWN
defines the client as the default.

-server KNOWN
-client KNOWN
sets the server as the default.
blog comments powered by Disqus


If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2014
[ home ]