title: How do I programmatically create a new KeyStore?
body: <p>I'm trying to programmatically create a new keystore in Java. The following code:</p>
  
  <pre><code>KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
  keyStore.setCertificateEntry("alias", cert);
  </code></pre>
  
  <p>throws a Uninitialized KeyStore exception. </p>