I want to start mysql server from eclipse and I need admin rights to start it, how can i do this?
import java.io.*;
public class Clasa {
public static void main(String args[]) {
try {
String command = "net start MySql55";
ProcessBuilder pb = new ProcessBuilder("cmd.exe", "/C", command);
pb.inheritIO();
Process pr = pb.start();
int exitVal = pr.waitFor();
System.out.println("Exited with error code " + exitVal);
} catch (Exception e) {
System.out.println(e.toString());
e.printStackTrace();
}
}
}