title: Generate a Secure Random Password in Java with Minimum Special Character Requirements
body: <p>How do I create a random password that meets the system's length and character set requirements in Java? </p>
  
  <p>I have to create a random password that is 10-14 characters long and has at least one uppercase, one lowercase, and one special character. Unfortunately, some special characters are <i>too</i> special and cannot be used, so I cannot use just printed ASCII.</p>
  
  <p>Many of the examples on this site generate a random password or session key without enough entropy in the characters or without realistic requirements in a business setting like the ones given above, so I'm asking more pointed question to get a better answer.</p>
  
  <p>My character set, every special character on a standard US keyboard except for a space:
      </p>
  
  <pre><code>A-Z
  a-z
  0-9
  ~`!@#$%^&amp;*()-_=+[{]}\|;:'",&lt;.&gt;/?
  </code></pre>