When you install Java on a device, it automatically comes with some default certificates. To know which certificates are present in Java, you need to navigate to Control Panel > Java > Security > Manage Certificates.
Of course you can manually import certificates, but we want to know how we can do this programmatically before making the package. The certificates in Java are kept in a file called cacerts. This file can be found in:
For X64 Java:
For X86 Java:
C:\Program Files (x86)\Java\jre%version%\lib\security
To edit the cacerts there are many utilities out there, but in this article we are going to have a look over KeyStore Explorer. Keystore Explorer is a free utility tool that can open up the cacerts file and will let us add many types of certificates into it.
Once you install KeyStore Explorer and start it for the first time, it will let you know that if you want to edit the cacerts it needs an extra JavaCryptography zip file. You can download the zip file from here:
Once you added the zip file, you should be able now to open the cacerts. Now, when you try to open the cacerts file, it will prompt you to input a password. The default password for the cacerts file is changeit.