title: How to create mysql dump with Java on Linux system?
body: <p>i have to make backups of mysql database in my application.</p>
  
  <p>I run the command in Windows and works nice.
  This is the command:</p>
  
  <pre><code>String executeCmd = mysqldumppath +" -u " + dbUserName + " -p" + dbPassword + " --add-drop-database -B " + dbName + " -r " + filePath;
  Runtime.getRuntime().exec(executeCmd);
  </code></pre>
  
  <p>When i try this command on my linux server, i need to put a sudo password.
  How i pass password in the command line?</p>
  
  <p>I had read many solutions but no success. </p>