This handy article is the standard answer to this kind of query:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
The author shows you how to run the command using Process.exec() and how to increase the robustness of your app by reading both STDOUT and STDERR.
Cheers,
John
Create an array of strings and put each string to an array element and pass it to exec.
By the way why do you want to start mysql from your java app directly. You can register it as a background service and then control the service. I think that will make things more simple.
all you will need is two commands.
net start mysql
net stop mysql