Question: how to install pfx certificate in java?
Answer: Create a new keystore. ... 
Execute: keytool -genkey -alias mycertificate -keyalg RSA -keysize 2048 -keystore mykeystore. ... 
Empty the keystore. ... 
Import the PKCS12 File.