title: RMI over SSL, How do I integrate truststore and keystore into application?
body: <p>I followed the tutorial at <a href="https://blogs.oracle.com/lmalventosa/entry/using_the_ssl_tls_based" rel="nofollow">SSL/TLS-based RMI Socket Factories</a></p>
  
  <p>And I have been able to generate a keystore and trustore.
  For the moment only the Server authenticates itself. </p>
  
  <p>When I put the keystore and trustore file in the root folder of my Eclipse project and I launch manually in windows console (or adding VM arguments in Eclipse) : </p>
  
  <pre><code>$ java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword RmiRegistry &amp;
  
  $ java -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password HelloImpl &amp;
  
  $ java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword HelloClient
  </code></pre>
  
  <p>Everything works correctly. Now if I want to send my application (it is for an assignment). Where can I put the trustore and keystore and how can I allow the corrector to launch</p>
  
  <pre><code>$ java RmiRegistry &amp;
  </code></pre>
  
  <p>rather than </p>
  
  <pre><code> $ java -Djavax.net.ssl.trustStore=truststore -Djavax.net.ssl.trustStorePassword=trustword RmiRegistry &amp;
  </code></pre>