I want to execute some sql scripts using Java\'s Runtime.exec method. I intend to invoke mysql.exe / mysql.sh and redirect the script file to this process. From the command
Exec returns a Process object to you.
Process has getInputStream and getOutputStream methods.
Just use those to grab the input stream and start shoving bytes into it. Don't forget to read the output stream or the process may block.