United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6701692 DestroyJavaVM specification needs clarification
JDK-6701692 : DestroyJavaVM specification needs clarification

Details
Type:
Bug
Submit Date:
2008-05-13
Status:
Resolved
Updated Date:
2013-03-12
Project Name:
JDK
Resolved Date:
2013-03-12
Component:
docs
OS:
generic
Sub-Component:
hotspot
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs13
Fixed Versions:
8

Related Reports

Sub Tasks

Description
###@###.### wrote:
Source URL:
    http://download.java.net/jdk7/docs/technotes/guides/jni/spec/invocation.html#destroy_java_vm
DestroyJavaVM
...

The support for DestroyJavaVM was not complete in JDK/JRE 1.1. As of JDK/JRE 1.1 Only the main thread may call DestroyJavaVM. Since JDK/JRE 1.2, any thread, whether attached or not, can call this function. If the current thread is attached, the VM waits until the current thread is the only non-daemon user-level Java thread. If the current thread is not attached, the VM attaches the current thread and then waits until the current thread is the only non-daemon user-level thread. The JDK/JRE still does not support VM unloading, however.

Can someone explain what does it mean by the last sentence "The JDK/JRE still does not support VM unloading, however."? Rest of the paragraph gives the impression that unloading of the VM is supported starting with JDK/JRE 1.2.

Also it appears that we did a poor job in updating this specification from earlier versions. For example, there is a link to "Changes in JDK 1.1.2" under "1. Introduction" in the Table of Contents web page:

    http://download.java.net/jdk7/docs/technotes/guides/jni/spec/jniTOC.html

Clicking on "Changes in JDK 1.1.2" link takes to the changes in Java SE 6.0. i.e., the text for that link wasn't updated even though the actual content it was pointing to was updated.

Similarly it is hard to figure out the JDK version it was referring to in the following web page (although it appears under J2SE 1.5.0, the text appears to be a copy/paste from a 1999 document):

    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html#destroy_java_vm

                                    

Comments
I removed the line stating that JDK/JRE does not support VM unloading. The other issue (confusion with version numbers) has already been taken care of by Sharon during recent doc cleanup. This is fixed in the jdk8 repo.
                                     
2013-03-12
Fixed in the jdk8 repo.
                                     
2013-03-12



Hardware and Software, Engineered to Work Together