title: Runtime.exec() gives Error: Could not find or load main class
body: <p>'Street.class' in my Eclipse project is under \bin in package trafficcircle. The error below is from stderror of the created process; I thought Runtime.exec would complain first if it wasn't found...what's up with this?</p>
  
  <p>Code that runs 'Street' process:</p>
  
  <pre><code>    Process process = runtime.exec("java -classpath \\bin trafficcircle.Street 1 2");
  </code></pre>
  
  <p>Where 'Street' is:</p>
  
  <pre><code>public class Street {
  
  /**
   * @param args
   * 0 - Simulation run time
   * 1 - Flow time interval
   */
  public static void main(String[] args) {
      System.out.println(args[0]);
      System.out.println(args[1]);
      System.out.flush();
  }
  }
  </code></pre>
  
  <p>Process prints out:</p>
  
  <p>Error: Could not find or load main class trafficcircle.Street</p>
  
  <p>Process exitValue: 1</p>
  
  <p>And yes, this works on cmd line:</p>
  
  <p>C:\Users\Brent>java -classpath "D:\Java Programs\IPCTrafficCircle\bin" trafficcircle.Street 1 2</p>