title: How to completely disable heap dumps for a java process?
body: <p>I would like to disable them to block anyone from gaining access to passwords stored in memory. What I found so far is</p>
  
  <p>-XX:+DisableAttachMechanism</p>
  
  <p>This blocks connections via i.e. jconsole but I can force jmap to get a dump like:</p>
  
  <p>jmap -dump:file=/tmp/x.bin -F $PID</p>
  
  <p>I can't seem to find any option to completely disable them:</p>
  
  <p><a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html" rel="nofollow">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</a></p>
  
  <p>Is there a way?</p>
  
  <p>Thanks</p>