jar - Java Runtime.getRuntime().exec() disable network on win 7 -
how can enable/disable network java program .jar
how can use :
runtime.getruntime().exec()
is can
process result = runtime.getruntime().exec("ipconfig/release");
thank you
you can me fix
processbuilder pb = new processbuilder("netsh", "lan", "disabled","name=\"lan\""); pb.redirecterrorstream(true); process process = pb.start(); bufferedreader reader = new bufferedreader( new inputstreamreader(process.getinputstream())); string line = null; while ((line = reader.readline()) != null) { system.out.println(line); }
Comments
Post a Comment