I need to generate a cert and can't find this directory. Thanks!
Asked
Active
Viewed 3.6k times
14
-
Certificate generation in Java is handled by the `keytool` command. – John Haager Dec 07 '11 at 00:54
-
Possible duplicate of [Where is the Folder /lib/security from JRE 8 under OS X?](https://stackoverflow.com/questions/33488490/where-is-the-folder-lib-security-from-jre-8-under-os-x) – roottraveller Aug 08 '19 at 12:26
5 Answers
41
On Mavericks (OS X 10.10) with Oracle Java 8, it appears to be:
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/security

Lorin Hochstein
- 57,372
- 31
- 105
- 141
-
On OS X 10.10.5 the accepted answer did not work for me, but this answer did. – Paul Jun 07 '16 at 02:19
-
For installation of self signed certificates or any other certs, the right cacert path on Mac OS, with JDK 1.8 is /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/lib/security to avoid sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException – saikarthik parachi Aug 30 '18 at 21:38
20
I believe the equivalent directory to jre/lib/security under OS X is:
/Library/Java/Home/lib/security

Shaun
- 2,446
- 19
- 33
-
1
-
2for me it was at `/Library/Java/JavaVirtualMachines/adoptopenjdk-9.jdk/Contents/Home/lib/security ` – roottraveller Aug 08 '19 at 12:24
6
The following works for 10.11.6
/Library/Java/Home/jre/lib/security
It's actually just a link to the
/Library/Java/JavaVirtualMachines/.../Contents/Home/jre/lib/security

Mickael Tardy
- 311
- 3
- 6
2
The location I've found on MacOS Mojave with jre 1.8.0 is:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/security
I was not trying to do any Java certificate-store stuff but needed to tweak some security settings for an applet.
Also, can you believe it's 2019 and we're still messing with this crap? ;)

Pete Kowalsky
- 31
- 3
-
1Just give an answer, if you have any, rather than being sarcastic IMHO. – AhmadWabbi Feb 14 '19 at 23:43
-
-
-
0
/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/jre/lib/security

RKRK
- 1,284
- 5
- 14
- 18