Runtime.getRuntime().exec()
I can not read a file only when database name contains like (new database (myid) etc. I give a following example code: 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); } Suppose my database name de mo means when I print