Note that keytool comes with JDK (In this example JDK 1.8 is used). With this tool, we can manage a keystore (database) of cryptographic keys and trusted certificates etc.
Above example command will create a file 'localhost-rsa.jks' under C:\my-cert-dir.