I perform the following command from an exercise:
keytool -genkey -alias First_Java_Cert -keyalg RSA -keystore /home/first/keystore/keystore.jks -storepass passw0rd -dname "CN=first, O=IBM, C=GB" -keypass passw0rd
So I just created a certificate with both a private and public key using the keytool.
Now I perform the following:
keytool -export -keystore /home/first/keystore/keystore.jks -storepass passw0rd -alias First_Java_Cert -file /home/import/First_Java_Cert.cer
This extracts a certificate with a public key.
(Am I correct in my assumptions so far?)
So using a command line program (non-GUI) that would come with either Windows or Java, could someone please post how to extract a private key from the .jks