只有当数据库名称包含像(新的数据库(身份识别码)等 我给下面的示例代码,我无法读取文件:调用Runtime.getRuntime()EXEC()
dumpCommand = "C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump -h"+hostName+user+databaseName;
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(dumpCommand);
InputStream in = proc.getInputStream();
BufferedReader br=new BufferedReader(new InputStreamReader(in));
String line =null;
while((line=br.readLine())!=null)
{
//able to read line only when database name like abc,datastore etc...
System.out.println(line);
}
假设我的数据库名でも意味着当我打印行我的数据库名称只喜欢去。 可能在数据库名称与空的空间?