Java Reference
In-Depth Information
DETERMINING THE DEFAULT COMPILER
To determine the default compiler for a particular installation of Java, run this command:
% java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode)
This example is from my Linux desktop and a 32-bit Java binary. The last line indicates which of
the three possible compilers will be used: client (32-bit), server (32-bit), or 64-bit server.
Even if the particular installation doesn't support the specified compiler, the last line will show
the actual compiler used:
% java -client -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
In this case, the 64-bit version of Java is used, which (on Linux) supports only the 64-bit server
compiler.
These defaults are based on the notion that startup time is always the most important thing
for 32-bit Windows machines, and Unix-based machines are generally more interested in
long-running performance. As always, there are exceptions: certainly modern Windows-
based machines can run powerful servers even in 32-bit mode, and in those cases the server
compiler should be used. Similarly, many application servers use simple Java-based adminis-
trative commands to inspect or change their configuration; even on Unix-based machines,
these are better run with the client compiler.
Search WWH ::




Custom Search