title: VisualVM crashes on mac
body: <p>I'm facing some trouble working on VisualVM on Mac.</p>
  
  <p>Whenever I run the visualvm app (either from the app installed or by going to /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/jvisualvm (unix executable file) it opens the terminal, for a moment visualvm also starts and then the following is printed in the terminal and visualvm closes</p>
  
  <p>Last login: Thu Dec  7 22:15:06 on ttys000
      Kingshuks-MacBook-Pro:~ kingshuk$ /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/jvisualvm ; exit;
      logout
      Saving session...
      ...copying shared history...
      ...saving history...truncating history files...
      ...completed.</p>
  
  <pre><code>[Process completed]
  
  I have recently upgraded from Sierra to High Sierra. I think I have used visualvm before this upgrade, might be once or twice though.
  
  Any help to resolve this issue would be great..!! Please let me know if any additional information is needed.
  
  I tried to use 
  /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/jvisualvm -J-Dnetbeans.logger.console=true but got the following error. Guess this is because I don't have netbeans installed??
  
  
  Last login: Sat Dec  9 16:21:57 on console
  Kingshuks-MacBook-Pro:~ kingshuk$ /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/‌Home/bin/jvisualvm -J-Dnetbeans.logger.console=true
  -bash: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/‌​Home/bin/jvisualvm: No such file or directory
  Kingshuks-MacBook-Pro:~ kingshuk$ /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/jvisualvm -J-Dnetbeans.logger.console=true
  -------------------------------------------------------------------------------
  &gt;Log Session: Saturday, December 9, 2017 4:41:03 PM EST
  &gt;System Info: 
    Product Version         = Java VisualVM
    Operating System        = Mac OS X version 10.13.1 running on x86_64
    Java; VM; Vendor        = 1.8.0_152; Java HotSpot(TM) 64-Bit Server VM 25.152-b16; Oracle Corporation
    Runtime                 = Java(TM) SE Runtime Environment 1.8.0_152-b16
    Java Home               = /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre
    System Locale; Encoding = en_US (visualvm); UTF-8
    Home Directory          = /Users/kingshuk
    Current Directory       = /Users/kingshuk
    User Directory          = /Users/kingshuk/Library/Application Support/VisualVM/8u131
    Cache Directory         = /Users/kingshuk/Library/Caches/VisualVM/8u131
    Installation            = /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/visualvm
                              /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/profiler
                              /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform
    Boot &amp; Ext. Classpath   = /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/classes:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/System/Library/Java/Extensions/MRJToolkit.jar
    Application Classpath   = /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/boot.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/org-openide-modules.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/org-openide-util-lookup.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/org-openide-util.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/boot_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/boot_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-modules_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-modules_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util-lookup_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/tools.jar
    Startup Classpath       = /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/core/org-openide-filesystems.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/core/core.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/core/locale/core_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/core/locale/org-openide-filesystems_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/core/locale/org-openide-filesystems_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/core/locale/core_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/visualvm/core/com-sun-tools-visualvm-modules-startup.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/visualvm/core/locale/com-sun-tools-visualvm-modules-startup_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/visualvm/core/locale/core_visualvm.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/visualvm/core/locale/com-sun-tools-visu
  
  alvm-modules-startup_ja.jar
  
  -------------------------------------------------------------------------------
  java.lang.NullPointerException
      at java.awt.Window.init(Window.java:497)
      at java.awt.Window.&lt;init&gt;(Window.java:537)
      at java.awt.Frame.&lt;init&gt;(Frame.java:420)
      at org.netbeans.core.startup.Splash.setRunning(Splash.java:119)
      at org.netbeans.core.startup.Main.start(Main.java:257)
      at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:84)
      at java.lang.Thread.run(Thread.java:748)
  Kingshuks-MacBook-Pro:~ kingshuk$ 
  </code></pre>
  
  <p>I was also able to notice that the visualvm script calls the nbexec file. And when I tried to run that independently, I got the below error on the console.</p>
  
  <pre><code>Last login: Wed Dec 20 17:56:02 on ttys000
  Kingshuks-MacBook-Pro:~ kingshuk$ /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/lib/visualvm/platform/lib/nbexec ; exit;
  java.io.FileNotFoundException: /var/cache/lastModified/all-checksum.txt (No such file or directory)
      at java.io.FileOutputStream.open0(Native Method)
      at java.io.FileOutputStream.open(FileOutputStream.java:270)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:213)
      at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:162)
      at org.netbeans.Stamps.compareAndUpdateFile(Stamps.java:444)
      at org.netbeans.Stamps.stamp(Stamps.java:331)
      at org.netbeans.Stamps.moduleJARs(Stamps.java:282)
      at org.netbeans.Stamps.file(Stamps.java:168)
      at org.netbeans.Stamps.asByteBuffer(Stamps.java:173)
      at org.netbeans.Stamps.asStream(Stamps.java:129)
      at org.netbeans.Stamps.checkPopulateCache(Stamps.java:540)
      at org.netbeans.Stamps.file(Stamps.java:160)
      at org.netbeans.Stamps.asByteBuffer(Stamps.java:173)
      at org.netbeans.Stamps.asByteBuffer(Stamps.java:153)
      at org.netbeans.Archive.&lt;init&gt;(Archive.java:81)
      at org.netbeans.JarClassLoader.initializeCache(JarClassLoader.java:68)
      at org.netbeans.MainImpl$BootClassLoader.run(MainImpl.java:298)
      at org.netbeans.CLIHandler.initialize(CLIHandler.java:559)
      at org.netbeans.CLIHandler.initialize(CLIHandler.java:345)
      at org.netbeans.MainImpl.execute(MainImpl.java:154)
      at org.netbeans.MainImpl.main(MainImpl.java:46)
      at org.netbeans.Main.main(Main.java:44)
  </code></pre>
  
  <p>Thanks..!!</p>