Linux & MacOS
The cacerts file is a collection of trusted certificate authority (CA) certificates. It is located in the Java Runtime Environment distribution under the path:
The extension is not specified in the file name, but the file is of JKS type. For this reason, in some cases, an explicit indication of the file type is required. ZooKeeper, for example, has a special property ssl.trustStore.type.
Installed Java implies the ability to run java in a terminal. So, we can trace where the executable file is located:
readlink -f $(which java)
The which command shows you where the link being used is. readlink reads the link and shows the original file. As a result, we get something like:
It remains to replace /bin/java with the path to cacerts:
Get the location of the link:
Then, we are looking for what the link points to. Notice the argument to the dir command. We need to use the path to the folder with the link, not to the link itself:
findstr java | dir /a "<path to the folder with the link from the previous command>"
We get something like:
Replace bin\java.exe with the path to cacerts:
If you still have any questions, feel free to ask me in the comments under this article, or write me on email@example.com.
If I saved your day, you can support me :)