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

HotspotDiagnosticMXBean.setVMOption() throws NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: core-svc
    • Labels:
      None

      Description

      Just call HotSpotDiagnostic.setVMOption("HeapDumpPath","/tmp") and you get the exception below:

      $ /usr/java/jdk1.7.0/bin/java -jar /tmp/Test/dist/Test.jar
      Exception in thread "main" java.lang.NullPointerException
      at sun.management.HotSpotDiagnostic.setVMOption(HotSpotDiagnostic.java:113)
      at test.Main.main(Main.java:19)

      $ /usr/java/jdk1.7.0/bin/java -version
      java version "1.7.0-ea"
      Java(TM) SE Runtime Environment (build 1.7.0-ea-b59)
      Java HotSpot(TM) Client VM (build 16.0-b03, mixed mode, sharing)
      $

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                thurka Tomáš Hůrka
                Reporter:
                thurka Tomáš Hůrka
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: