tolga2
March 29th, 2014, 10:45 AM
Hello, what I would like to achieve is installing a software from java application that I created. I've got permission with gksudo. Then, I typed my pass and the program started working until yes/no option was appeared. How can I pass this question ?
installation =Runtime.getRuntime().exec(new String[]{"gksudo","apt-get","install","PACKAGE"});
inputSw = new BufferedReader(new InputStreamReader(installation.getInputStream()));
while( (lineSw=inputSw.readLine())!=null)
{
System.out.println(lineSw);
}
installation =Runtime.getRuntime().exec(new String[]{"gksudo","apt-get","install","PACKAGE"});
inputSw = new BufferedReader(new InputStreamReader(installation.getInputStream()));
while( (lineSw=inputSw.readLine())!=null)
{
System.out.println(lineSw);
}