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

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -