title: How to add properties file to java classpath using command-line?
body: <p>My current structure looks like  </p>
  
  <pre><code>$ls
  project.jar
  propertiesFileA
  propertiesFileB
  </code></pre>
  
  <p>The way I run my project, I do </p>
  
  <pre><code>java -jar project.jar MyClass 
  </code></pre>
  
  <p>It's a <code>Spring</code> based project where <code>context.xml</code> resolves some of the properties from <code>propertiesFileA</code> and <code>propertiesFileB</code> </p>
  
  <p>So I get error because Spring can not find these files. That means I need to add them to <code>classpath</code>.  </p>
  
  <p>I tried following with no success at all  </p>
  
  <pre><code>java -classpath .:/project.jar MyClass
  
  java -cp "project.jar:." MyClass
  
  java -classpath .;project.jar MyClass
  </code></pre>
  
  <p><strong>Question</strong>  </p>
  
  <p>How can I provide <code>propertiesFileA</code> and <code>propertiesFileB</code> on command-line to <code>MyClass</code>?</p>