title: How do I Set Environment variable for a multithread program?
body: <p>I would like to run a parallel Java threaded program and take advantage of multiprocessor execution. 
  However I need to set the environment variable, to enable a multi-threaded environment. I understand that you can set the environment by issuing setenv PARALLEL 4 OR setenv OMP_NUM_THREADS 4 (for an OpenMP program). </p>
  
  <p>This should enable 4 processors to run concurrently if you have 4 processor. </p>
  
  <p>My Question is:</p>
  
  <blockquote>
    <ol>
    <li>where do you issue the above command (SETENV) and how do you do it?</li>
    </ol>
  </blockquote>
  
  <p>In java you can call <code>System.getenv("NUM_THREADS")</code> to get the <code>NUM_THREADS</code>. However there is no clear way of setting the environment. I am running AMD-x64 machine: OS: Windows 8, Processor: AMD E-300 APU Dual-Core processor, Ram: 4.00GB, System Type: 64-bit OS.</p>