Oracle has written complete instructions on converting PEM to keystore. It also covers p12. This will probably do what you want.
Unfortunately it isn't very findable by search engines as they call it "JKS" rather than keystore.
In short:
Convert the certificate from PEM to PKCS12, using the following command:
openssl pkcs12 -export -out eneCert.pkcs12 -in eneCert.pem
You may ignore the warning message this command issues.
Enter and repeat the export password.
Create and then delete an empty truststore using the following commands:
keytool -genkey -keyalg RSA -alias endeca -keystore truststore.ks
keytool -delete -alias endeca -keystore truststore.ks
The -genkey command creates the default certificate shown below. (This is a temporary certificate that is subsequently deleted by the -delete command, so it does not matter what information you enter here.)
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
Enter key password for <endeca>
(RETURN if same as keystore password):
Re-enter new password:
Import the CA into the truststore, using the following command:
keytool -import -v -trustcacerts -alias endeca-ca -file eneCA.pem -keystore truststore.ks
Enter the keystore password.
At the prompt, "Trust this certificate?" type yes.
Create an empty Java KeyStore, using the following commands:
keytool -genkey -keyalg RSA -alias endeca -keystore keystore.ks
keytool -delete -alias endeca -keystore keystore.ks
The -genkey command creates the default certificate shown below. (This is a temporary certificate that is subsequently deleted by the -delete command, so it does not matter what information you enter here.)
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN="Unknown", OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
Import your private key into the empty JKS, using the following command:
keytool -v -importkeystore -srckeystore eneCert.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.ks -deststoretype JKS