How to import x509.pem pk8 file into jks keystore Prerequiste: OpenSSL and keytool installed and added to your PATH Generate a file platform.priv.pem from you pk8 file. openssl pkcs8 -in platform.pk8 -inform DER -outform PEM -out platform.priv.pem -nocrypt