cd C:\Program Files\Java\jdk1.8.0_152\bin
1.生成keystore
keytool -genkeypair -validity 3650 -keysize 2048 -alias onlyKey -sigalg SHA256withRSA -keyalg RSA -keystore D:/only.keystore -storepass only -keypass only -v
CN=(CN)OU=(CN)O=(CN)L=(CN)ST=(CN)C=(CN)
keytool -importkeystore -srckeystore D:/only.keystore -destkeystore D:/only2.keystore -deststoretype pkcs12
2.keystore --> P12
keytool -importkeystore -srckeystore D:/only2.keystore -srcstoretype JKS -deststoretype PKCS12 -destkeystore D:/only2.p12
3.P12 --> JKS
keytool -v -importkeystore -srckeystore D:/only2.p12 -srcstoretype PKCS12 -destkeystore D:/only.jks -deststoretype JKS
keytool -importkeystore -srckeystore D:/only.jks -destkeystore D:/only2.jks -deststoretype pkcs12
4.keystore --> key
keytool -export -alias only -keystore D:/only2.keys