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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -