title: Import StartCom CA certificates in Windows JRE
body: <p>I have a Java application accessing a service that uses a StartCom SSL certificate. For this to work, I need to add the StartCom CA certs to Java's truststore, because they're not in there by default yet. I've succesfully done that on linux using these commands</p>
  
  <pre><code>sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca -file ca.crt
  sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class1 -file sub.class1.server.ca.crt
  sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class2 -file sub.class2.server.ca.crt
  sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class3 -file sub.class3.server.ca.crt
  sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class4 -file sub.class4.server.ca.crt
  </code></pre>
  
  <p>(From <a href="http://www.ailis.de/~k/uploads/scripts/import-startssl" rel="noreferrer">this script</a>)</p>
  
  <p>The same command (adapted appropriately) doesn't work on Windows however. I get:</p>
  
  <pre><code>keytool error: java.lang.RuntimeException: Usage error, trustcacerts is not a legal command
  </code></pre>
  
  <p>How to make it work?</p>