title: VirtualMachine.attach failing
body: <p>I wrote a program that uses the VirtualMachine attach API to dynamically attach to a jar. My machine is 64 bit, and the only reason I can think of that would stop  is because of my messing around with the environment variables of java(no java_home was set and I tried to fix it). Since getting this error, I have reinstalled both the JDK and JRE to no avail. My guess is that it is some sort of problem loading attach.dll, which is 64 bit.</p>
  
  <p>Anyone have suggestions?
  Stack trace of error:</p>
  
  <pre><code>    at sun.tools.attach.HotSpotAttachProvider.listVirtualMachines(HotSpotAttachProvider.java:92)
      at sun.tools.attach.WindowsAttachProvider.listVirtualMachines(WindowsAttachProvider.java:76)
      at com.sun.tools.attach.VirtualMachine.list(VirtualMachine.java:147)
      at me.stoud.*.JVM.&lt;init&gt;(JVM.java:19)
      at me.stoud.helper.*.checkJVM(CheckHelper.java:158)
      at me.stoud.helper.*.initiateChecks(CheckHelper.java:39)
      at me.stoud.start.Launch.main(Launch.java:33)
  Caused by: java.lang.NullPointerException
      at sun.jvmstat.perfdata.monitor.protocol.local.LocalVmManager.activeVms(LocalVmManager.java:148)
      at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.activeVms(MonitoredHostProvider.java:150)
      at sun.tools.attach.HotSpotAttachProvider.listVirtualMachines(HotSpotAttachProvider.java:81)
          ... 6 more
  </code></pre>
  
  <p>Forgot to include: it's a java.lang.InternalError being thrown</p>