can someone please correct to me this program, i try to connect to MySQL but the process cant stop, if i run this command in command prompt there is cursor waiting and i authenticate without it just pressing enter here is the code:
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
try {
// TODO code application logic here
Process x=Runtime.getRuntime().exec("cmd /C C:\\xampp\\mysql\\bin\\mysql -u root -p -e \"show slave status\\G\"| findstr \"Last_SQL\"");
BufferedReader br = new BufferedReader(new InputStreamReader(x.getInputStream()));
BufferedReader stdError = new BufferedReader(new InputStreamReader(x.getErrorStream()));
// read the output from the command
String s = null;
String t=null;
while ((s = br.readLine()) != null) {
jTextArea1.append("\n"+s);
}
}catch(IOException ex){
ex.printStackTrace();
}
}