To create new certificate in PKCS12 format use this command:
```keytool -genkeypair -alias yourkeyname -keyalg RSA -storetype pkcs12 -keysize 2048 -validity 9125 -keystore yourkeyfile.jks```
Please note, that for PKCS12 key and key store passwords should be the same!
Many thanks to author for this article!