title: progress bar which progresses in function of commands line or copy tasks
body: <p>I'm trying to add in my application a progress bar which progresses according to a command line or Java code, my application is a kind of setup or installation Etaps of another program.</p>
  
  <p>all progress bars that I found does not interact with copy task, it means that I do not know when the copy task is finished.</p>
  
  <p>I want my progress bar to progresses in function of these lines command:</p>
  
  <pre><code>try {
              Runtime.getRuntime().exec("cmd.exe /k mkdir \""+dossier+"\\results\" &amp;&amp;"
                      + " mkdir \""+dossier+"\\results\\basededonnees\" &amp;&amp;"
                      + " mkdir \""+dossier+"\\results\\ordonnances\" &amp;&amp;"
                      + " mkdir \""+dossier+"\\results\\piecesjoins\"");
  
              Runtime.getRuntime().exec("cmd.exe /k mkdir \""+dossier+"\\basededonnees\" &amp;&amp;"
                      + " echo CREATE DATABASE "+nomBase+"; &gt;&gt; \""+dossier+"\\basededonnees\\CreerDB.sql\"");
  
              Runtime.getRuntime().exec("cmd.exe /k xcopy apps\\lib \""+dossier+"\\lib\" &amp;&amp;"
                      + " set path=%path%;C:\\wamp\\bin\\mysql\\mysql5.5.20\\bin &amp;"
                      + " set path=%path%;C:\\wamp\\bin\\mysql\\mysql5.5.24\\bin &amp;"
                      + " mysql -u root &lt; \""+dossier+"\\basededonnees\\CreerDB.sql\"");
  
      } catch (IOException ex) {
          JOptionPane.showMessageDialog(null, "Une erreur est survenue \n" + ex.getMessage(), "Information", JOptionPane.INFORMATION_MESSAGE);
      }
  </code></pre>
  
  <p>dossier = 'C:\Program Files\NameOfMyApps'
  nomBase = 'NameOfMyDataBase'</p>
  
  <p>when all the commands and copy tasks are finished I want the bar reach 100%.</p>
  
  <p>thank you in advance, and sorry for the language because I do not metrized a good English</p>
  
  <p>to better explain here is a screenshot:
  <a href="http://www.4shared.com/photo/-b2S2bFN/apps.html" rel="nofollow">enter link description here</a></p>
  
  <p><a href="http://www.4shared.com/download/-b2S2bFN/apps.jpg?tsid=20130605-124016-afcd18b4" rel="nofollow">http://www.4shared.com/download/-b2S2bFN/apps.jpg?tsid=20130605-124016-afcd18b4</a></p>