title: Where is the location of Keystore file in JAVA?
body: <p>I know the cacerts file that ship with JRE is the truststore where Root CA certificates are stored, many people refer to this file as a keystore as well. However, my understanding of the keystore file is another file where private keys are kept for the server to authenticated it-self.</p>
  
  <p>Then, where JAVA stores the private keys? or where is the location of the keystore file exactly, is it the same file of cacerts?</p>
  
  <p>Moreover, the following command list all Root CA certificates:</p>
  
  <pre><code>&gt; keytool -list -storepass changeit -keystore "C:\Program Files\Java\jre1.8.0_191\lib\security\cacerts"
  </code></pre>
  
  <p>Why the keytool cannot list the Root CA without the <strong>-keystore</strong> &amp; <strong>-storepass</strong> flags?</p>