keytool -genkey -keyalg rsa -keysize 2048 -alias jdkcert2048
keytool -import -alias jdkcert2048 -file ca-cert.crt
keytool -import -alias jdkcert2048 -file code.crt
jarsigner test.jar jdkcert2048
Notice in the above how I generate a Certificate Signing Request (CSR) using the alias jdkcert2048 and then I import the Certificate Authority (CA) Root Certificate and the code signing certificate using the alias jdkcert2048 and then later sign my jar file with the same alias.