public class SqlDum
{
public static void main(String args[])
{
try
{
String str="mysqldump -u root -p threadpool > test.sql";
Process p=Runtime.getRuntime().exec(str);
p.waitFor();
}
catch(Exception e)
{
System.out.println(e);
}
}
}
The above code executed sucessfully but there is no generation of sql file.If iam run the command mysqldump -u root -p threadpool > test.sql its executes sucessfully and backup file created.... Command execution takes place in linux platform...?how can i execute in java?