Search code examples
javamavensecurityssl-certificateosx-yosemite

Java Security - Missing lib/security directory


I am trying to build the Apache Storm Starter Project using Maven on Mac OS X 10.10

I am failing the build because of a SunCertPathBuilderException which suggests I need to add a security certificate in my $JAVA_HOME/lib/security directory.

This Stackoverflow Post suggests I am looking in the correct place.

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home

However, my $JAVA_HOME/lib directory contains no such security subdirectory. The contents are:

ant-javafx.jar ct.sym dt.jar ir.idl javafx-mx.jar jconsole.jar missioncontrol orb.idl packager.jar sa-jdi.jar tools.jar visualvm

Why don't I have this security directory? Also, is this really necessary for being able to build an example project from Apache?

How can I set up my JDK to build in situations like this?


Solution

  • If $JAVA_HOME refers to JDK 8 or below, then the security folder exists at:

    $JAVA_HOME/jre/lib/security
    

    not (the below is valid only for newer JDK versions)

    $JAVA_HOME/lib/security