You will need:
- Certificate file for your domain
- Private key for this certificate
- Intermediate certificates
- Root CA certificate
For certificate files I've used *.pem format as it is common and easy to handle (those are Base64 encoded text files).
So to generate JKS file from PEM files do this:
1. Bundle pem files into single file, The order of those files is very important, and should be like this: first main certificate, then intermediate certificates in the same order as they were on the page, and rootCA at the end)
$ cat certificate.pem inter1.pem inter2.pem inter3.pem inter4.pem rootCA.pem > bundle.pem
2. Generate pkcs12 (from bundle.pem and private.key)
$ openssl pkcs12 -export -inkey private.key -in bundle.pem -out yourdomain.com.p12 -name yourdomain.com
3. Generate *.jsk file
$keytool -importkeystore -destkeystore yourdomain.com.jks -srckeystore yourdomain.com.p12 -srcstoretype PKCS12 -alias yourdomain.com
In the end you will have yourdomain.com.jks file that can be imported to you application.