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

Popular posts from this blog

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -