7

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?

Community
  • 1
  • 1
Brian
  • 7,098
  • 15
  • 56
  • 73

1 Answers1

32

if $JAVA_HOME refers to a JDK, then the security folder exists at:

$JAVA_HOME/jre/lib/security

not

$JAVA_HOME/lib/security
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
  • Thanks! This was a careless oversight on my part. I missed that this was explained in the second answer on the original post. Do you know how I can add a cert to this so I can build the Apache project? – Brian Feb 03 '16 at 18:22
  • @BrianVanover I believe that you can import the certificate into `cacerts` keystore using `keytool`. – Eng.Fouad Feb 03 '16 at 18:26
  • The path is mentioned incorrectly in the Java Docs too: https://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html#Requirements – Prasanna Feb 05 '18 at 17:52