Question: how to use jks file?
Answer: Generate the server certificate. Type the keytool command all on one line: ...  Export the generated server certificate in keystore. jks into the file server. ...  To add the server certificate to the truststore file, cacerts. ...  Type yes , then press the Enter or Return key.