title: how to run a java program stored in sub directory from another java program in the current folder
body: <p>I have big problem, please help me My situation is this, i have program RegAlloc.java, that uses several classes that is another packages P1 and P2. RegAlloc.java and these 2 packages are in a folder called Temp1. Temp is folder that contains Temp1 and Simplify.java, this folder also contains Pacjages named P! and P2 i needs to run RegAlloc from Simplify.java is there any solution? i am using the Linux platform, pls help me</p>
  
  <pre><code>try{
      String s="RegAlloc.class";
      String[] cmd = {"java", "-classpath=home/koha/pjt_new/Temp/Temp1/", s};
  
      Process pro2 = Runtime.getRuntime().exec(cmd); 
      BufferedReader in = new BufferedReader(new nputStreamReader(pro2.getInputStream()));
  
      String line = null;
      System.out.println(in.readLine());
  
      while ((line = in.readLine()) != null) {
          text+=line;
          text+="\n";
      }
      System.out.println(text);
  
  } catch(Exception e) {
      System.out.println("not Okey");
  }
  </code></pre>