forked from xy2401/local-doc-java-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
305 lines (223 loc) · 9.98 KB
/
index.html
File metadata and controls
305 lines (223 loc) · 9.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Java(TM) Virtual Machines</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<TABLE summary="layout" BORDER="0" WIDTH="100%">
<TR>
<TD WIDTH="60">
<IMG SRC="../../images/javalogo52x88.gif" ALT="Java" BORDER=0 WIDTH=52 HEIGHT=88>
</TD>
<TD>
<center>
<h1>Java<sup><font size="-2">TM</font></sup> Virtual Machines</h1>
</center>
</TD>
<TD ALIGN=RIGHT VALIGN=TOP WIDTH="60">
<font size="-1"><a href="../../index.html">Documentation Contents</a></font>
</TD>
</TR>
</TABLE>
<!-- Body text begins here -->
<blockquote>
The Java 2 SDK, Standard Edition, contains two implementations of the
Java virtual machine (VM).
<dl>
<dt><em>Java HotSpot Client VM</em></dt>
<dd>The Java HotSpot 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.</dd>
<p>
<dt><em>Java HotSpot Server VM</em></dt>
<dd>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 <tt>-server</tt>
command-line option when launching an application, as in
<blockquote><pre>
java -server MyApp
</pre></blockquote></dd>
</dl>
<p>
Some features of Java HotSpot technology, common to both VM implementations,
are the following.
<ul>
<li><em>Adaptive compiler</em> - 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.
<p>
<li><em>Rapid memory allocation and garbage collection</em> -
Java HotSpot technology provides for rapid memory allocation for
objects, and it has a fast, efficient, state-of-the-art garbage collector.
<p>
<li><em>Thread synchronization</em> - 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.
</ul>
</blockquote>
<h2>New Features and Changes</h2>
<blockquote>
The following are some of the recently added features in the
Java HotSpot VMs.
<p>
Enhancements in J2SE 1.4.2:
<ul>
<li><a href="http://java.sun.com/j2se/1.4.2/changes.html#vm">Virtual Machine Enhancements in J2SE 1.4.2</a>
</ul>
Enhancements in J2SE 1.4.1:
<ul>
<li>J2SE 1.4.1 is available in versions that support the 64-bit
Intel Itanium processor on Linux Red Hat 7.2
and Windows XP 64-bit edition. Look for the downloads for these
versions on the J2SE 1.4.1 <a href="http://java.sun.com/j2se/1.4.1/download.html">download page</a>.
<p>
In this release, these 64-bit versions have the following limitations.
<ul>
<li>Applications can be run only in interpreted mode. The platform
will run in interpreted mode by default, with no need to supply the
<tt>-Xint</tt> flag on the command line when launching an application.
When using the 64-bit versions of the J2SE 1.4.1 platform, the command
<tt>java MyApp</tt> will launch and execute MyApp by interpreting
the bytecode. Java HotSpot-technology-based dynamic compilers for
64-bit support is planned for a future release of the J2SE platform.
<li>The 64-bit versions of J2SE 1.4.1 do not include the Java Plug-in
and Java Web Start products.
<li>The 64-bit versions of J2SE 1.4.1 do not have an installer application.
These versions are available only as a tar bundle.
</ul>
The 32-bit versions of the J2SE 1.4.1 will not work on Intel Itanium
machines.
<p><li>A deadlock detection utility has been added to the Java HotSpot VM.
The utility is invoked by a Ctrl+\ on the command line while an
application is running. The utility detects Java-platform-level
deadlocks, including locking done from the Java Native Interface (JNI),
the Java Virtual Machine Profiler Interface (JVMPI), and Java Virtual Machine
Debug Interface (JVMDI).
<p>
When invoked, the utility displays a thread dump to standard out
and indicates any Java-platform-level deadlocks it detects. Refer
to this <a href="sample-output.html">sample output</a>.
If the application is deadlocked because two or more threads are
involved in a cylce to acquire monitors, then the list of such
threads and monitors involved in the deadlocks are displayed.
Note, however, that this will not find deadlocks involving
threads waiting on monitors on which no signal will be forthcoming.
</ul>
<p>
Enhancements in J2SE 1.4.0:
<ul>
<li><b><a href="signal-chaining.html">Signal chaining</a></b>
<p><li><b><a href="error-handling.html">Error-reporting mechanism</a></b>
<p><li>The new <tt>-Xloggc:</tt><var>file</var> option reports on each
garbage-collection event, as with <tt>-verbose:gc</tt>, but logs this
data to <var>file</var>. In addition to the information
<tt>-verbose:gc</tt> provides, each reported event is preceeded by the
time (in seconds) since the first garbage-collection event.
<p><li>Beginning with J2SDK 1.4.0, the Classic Virtual Machine is no
longer shipped as part of the Java 2 SDK. (On Solaris platforms, the
Classic VM was removed in J2SDK 1.3.0.) If you have been running
your applications on the Classic VM by using the <tt>-classic</tt>
command-line option, you will need to use either the Java HotSpot
Client VM (invoked by default or by using the <tt>-client</tt> option)
or Java HotSpot Server VM (invoked with the <tt>-server</tt>
option). Attempting to launch an application with the <tt>-classic</tt>
option will result in this message: <tt>Error: Classic VM no longer
supported</tt>.
<p>
<a name="64bit"></a><li>The Solaris<sup><font size="-2">TM</font></sup>-SPARC<sup><font size="-2">TM</font></sup> platform edition of J2SDK 1.4.0
will support 64-bit operation on 64-bit Sparc-v9
platforms when using the Java HotSpot Server VM. With
a 64-bit address space, more than four gigabytes of heap
memory is available. The Java HotSpot Server VM
includes support for both 32-bit and 64-bit operations,
and users can select either 32-bit or 64-bit operation by
using command-line flags <tt>-d32</tt> or <tt>-d64</tt>,
respectively.
<ul>
<li>Users of the <a href="../jni/index.html">Java Native
Interface</a> will need to recompile their code to be able
to run it on the 64-bit VM.
<li>There is no 64-bit support for the Java HotSpot
Client VM. Only the Java HotSpot Server VM provides for
optional 64-bit operation.
<li>Users must install 64-bit Solaris support in order
to run the virtual machine in 64-bit mode.
<li>On older Sparcv9 systems, users must modify the file
<tt>/platform/sun4u/boot.conf</tt> in order to enable
64-bit programs. See the text in the <tt>boot.conf</tt>
file for more information.
</ul>
<p><li>The new <tt>-Xcheck:jni</tt> command-line option performs
additional checks for Java Native Interface (JNI) functions.
Specifically, the Java Virtual Machine validates the parameters passed
to the JNI function as well as the runtime environment data before
processing the JNI request. Any invalid data encountered indicates a
problem in the native code, and the Java Virtual Machine will terminate
with a fatal error in such cases. Expect a performance degradation when
this option is used.
<p><li>The J2SE 1.4.0 platform accepts class file versions in
the range 45.3 to 48.0.
</ul>
</blockquote>
<h2>Command-Line Options</h2>
<blockquote>
Some operating characteristics of the Java HotSpot VM can be
controlled by the use of command-line flags.
The command-line options supported by the Java HotSpot VMs are
described on the reference pages for the Java application launcher
(<a href="../../tooldocs/windows/java.html">Microsoft Windows</a> | <a href="../../tooldocs/solaris/java.html">Solaris Operating Environment | <a href="../../tooldocs/linux/java.html">Linux</a>). Non-standard options recognized by the current
implementations of the VMs, but not necessarily by future or non-Sun
implementations, are described on the <a href="http://java.sun.com/docs/hotspot/VMOptions.html">Java HotSpot VM Options</a> web page.
<p>
</blockquote>
<h2>See Also</h2>
<blockquote>
The following additional documentation is available on the
Sun web site.
<ul>
<li><a href="http://java.sun.com/docs/hotspot/index.html">Performance
Documentation</a>
<li><a href="http://java.sun.com/docs/hotspot/PerformanceFAQ.html">FAQ for
Java HotSpot Technology</a>
<li><a href="http://java.sun.com/docs/hotspot/VMOptions.html">Java HotSpot
VM Options</a>
<li><a href="http://www.sun.com/solaris/java/wp-hotspot/">Java
HotSpot Architecture white paper</a>
<li><a href="http://java.sun.com/products/hotspot/docs/general/hs2.html">The Java HotSpot Server VM: The Solution for Reliable, Secure Performance for the Enterprise</a>
</ul>
</blockquote>
<!-- Body text ends here -->
<!-- ============================================================== -->
<HR SIZE=3 NOSHADE>
<TABLE summary="layout" BORDER="0" WIDTH="100%">
<TR VALIGN=TOP>
<TD>
<P><FONT SIZE="-2">
<A HREF="../../relnotes/SMICopyright.html">Copyright ©</A> 2002
<A HREF="http://www.sun.com/">Sun Microsystems, Inc.</A>
All Rights Reserved.</FONT></P>
<br>
<FONT SIZE="-1">
Please send comments to:
</FONT>
</TD>
<TD ALIGN=RIGHT>
<IMG SRC="../../images/sunlogo64x30.gif" ALT="Sun" BORDER=0 WIDTH=64 HEIGHT=30>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>