Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8152556

Incorrect serviceability option of the Java launcher

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7
    • Verification:
      Verified

      Description

      A DESCRIPTION OF THE PROBLEM :
      Java Platform, Standard Edition Tools Reference (for both Unix and Windows: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html and http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html) contains incorrect name of the HeapDumpOnOutOfMemoryError JVM option:
      "-XX:+HeapDumpOnOutOfMemory
      Enables the dumping of the Java heap to a file in the current directory by using the heap profiler (HPROF) when a java.lang.OutOfMemoryError exception is thrown."

      During attempt to launch JVM with the specified option and error is thrown:

      > java -XX:+HeapDumpOnOutOfMemory -jar MyJar.jar

      Unrecognized VM option 'HeapDumpOnOutOfMemory'
      Did you mean '(+/-)HeapDumpOnOutOfMemoryError'?
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      The same also holds true for least 1.8.0u51 on Linux.

      SE 7 troubleshooting guide, for instance, contained correct option name: https://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-VM/html/memleaks.html#gdyrr

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      -XX:+HeapDumpOnOutOfMemoryError
      ACTUAL -
      -XX:+HeapDumpOnOutOfMemory

      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html

        Attachments

          Activity

            People

            • Assignee:
              ashenoy Anjana Shenoy (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: