title: mysql dump in java not working
body: <p>i am trying this command in java</p>
  
  <pre><code>executeCmd = DBConfig.dbLocation + "\\mysqldump -u " + mysqlUser +
      " -p"+DBConfig.dbPass + " " + DBConfig.dbName + 
      " -r -opt&gt;supervisorDbBkup.sql";
  </code></pre>
  
  <p>Its giving me code 1  instead of 0  </p>
  
  <pre><code>            String executeCmd = "";
      executeCmd = DBConfig.dbLocation+"\\mysqldump -u"+mysqlUser+
              " -p"+DBConfig.dbPass+" "+DBConfig.dbName+" -r -opt&gt;supervisorDbBkup.sql";
  
      Process runtimeProcess =Runtime.getRuntime().exec(executeCmd);
      int processComplete = runtimeProcess.waitFor();
      if(processComplete == 0){
          return "Backup taken successfully";
      } else {
          return "Could not take mysql backup";
      }
  </code></pre>
  
  <p>this is the command which i am running :   </p>
  
  <pre><code>                E:\program file\MySQL\MySQL Server 5.5\bin\mysqldump -uroot -p0502 dashboardsupervisor -r -opt&gt;supervisorDbBkup.sql
  </code></pre>
  
  <p>any idea </p>