I am looking on how how to obtain the location of cacerts of the default java installation, when you do not have JAVA_HOME or JRE_HOME
cacerts
JAVA_HOME
JRE_HOME
You can also consult readlink -f "which java". However it might not work for all binary wrappers. It is most likely better to actually start a Java class.
which java