keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048 keytool -export -file server.crt -alias selfsigned -keystore keystore.jks keytool -import -keystore %JAVA_HOME%\jre\lib\security\cacerts -file server.crt -alias selfsigned