title: How to set up Java VM to use the root certificates (truststore) handled by Mac OS X
body: <p>I get the following exception while using the <a href="https://github.com/fernandezpablo85/scribe-java" rel="noreferrer">scribe</a> OAuth library. </p>
  
  <pre><code>Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
  </code></pre>
  
  <p>Based on some googling it seems I should set up the JVM truststore somehow.</p>
  
  <p>Why do I need to do this? How can I instruct the Java VM to use the default truststore of the os? (Mac OS X in my case).</p>