title: passing environment variable to a java class in command line
body: <p>I have a necessity to read some properties from a file located in local <code>etc/myconfig-config/</code> folder. I need to give this file path in the command line. I have given it as mentioned below. But there is an error and it displays like </p>
  
  <pre><code>Error: Could not find or load main class test-tool.jar. 
  </code></pre>
  
  <p>the command given is</p>
  
  <pre><code>java  -cp -DconfigDir=/etc/myconfig-config/ test-tool.jar 
  service.ScriptGenerator $clinic_count $client_files_count 
  </code></pre>
  
  <p>can anybody please help me to resolve this.</p>
  
  <p>thanks</p>