JDK-6701692 : DestroyJavaVM specification needs clarification
  • Type: Bug
  • Component: docs
  • Sub-Component: hotspot
  • Affected Version: hs13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-05-13
  • Updated: 2021-09-02
  • Resolved: 2013-03-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Relates :  
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
Fixed in the jdk8 repo.
12-03-2013

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.
12-03-2013