tengo lo siquiente codigo pero no me recupera restaura la BD talvez alguien sabe donde tengo el error
Código
try { JFC_Backup.setVisible(true); int result = JFC_Backup.showOpenDialog(null); { File bkp; bkp = JFC_Backup.getSelectedFile(); cmd[0] = "cmd.exe" ; cmd[1] = "/C" ; cmd[2] = "C:/xampp/mysql/bin/mysql" -u root -p -h localhost "+bd+" < "+arq; Runtime rt = Runtime.getRuntime(); System.out.println("Execing " + cmd[0] + " " + cmd[1]); proc = rt.exec(cmd); // any error message? StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR"); // any output? StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT"); // kick them off errorGobbler.run(); outputGobbler.run(); // any error??? int exitVal = proc.waitFor(); if (exitVal == 0) { JOptionPane.showMessageDialog(null, "Backup Restaurado com sucesso !"); } else { JOptionPane.showMessageDialog(null, "Falha ao restaurar backup. \n Verifique as configurações ou entre em contato com o suporte !"); } } } catch (Exception e) { JOptionPane.showMessageDialog(null, e, "Erro!", 2); } }