How to get certificates into Java keystore?

It may be worth having a look at other java installations such as Importing LetsEncrypt into Java and Glassfish How to use the certificate for Tomcat Let's encrypt and JIRA/Tomcat - fully automated script