Under Linux, to find the location of $JAVA_HOME
:
readlink -f /usr/bin/java | sed "s:bin/java::"
the cacerts
are under lib/security/cacerts
:
$(readlink -f /usr/bin/java | sed "s:bin/java::")lib/security/cacerts
Under mac OS X , to find $JAVA_HOME
run:
/usr/libexec/java_home
the cacerts
are under Home/lib/security/cacerts
:
$(/usr/libexec/java_home)/lib/security/cacerts
UPDATE (OS X with JDK)
above code was tested on computer without JDK installed.
With JDK installed, as pR0Ps said, it's at
$(/usr/libexec/java_home)/jre/lib/security/cacerts
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…