Z
Z33di
Gast
wie kann man in den befehl der "Runtime.getRuntime().exec("cmd /c 'HIER'" kommt einen begriff mit Anführungszeichen und eine Variable aus dem programm einfügen?
try{
String s= "netsh interface ip set address name=\"LAN-Verbindung\" source=static addr="+ textfeld.getText()+ "mask="+ textfeld.getText()+"gateway=" +textfeld.getText()+ "gwmetric=1";
Runtime.getRuntime().exec(s);
}
catch (Exception ekjgsdhfkgh)
{
System.out.println("ekjgsdhfkgh");
}