title: How to export public key from .jks file using Keytool?
body: <p>Right now I'm just trying to change my hostname in WSO2 by following this guide:
  <a href="https://docs.wso2.com/display/IS550/Changing+the+hostname" rel="noreferrer">https://docs.wso2.com/display/IS550/Changing+the+hostname</a></p>
  
  <p>I've come to Step 4 after generating a .jks file called newkeystore.jks and in this step it should export the public key when I run this in command line:</p>
  
  <pre><code>keytool -export -alias certalias -keystore newkeystore.jks -file &lt;public key name&gt;.pem
  </code></pre>
  
  <p>I've tried this and I receive the error "The system cannot find the specified file."</p>
  
  <p>My system environment variables are set so I can use keytool properly. I can see that the .jks file is generated and it is not empty. I'm not sure what the problem here is.</p>