Flush DNS using Java

风格不统一 提交于 2019-12-24 08:56:10

问题


The usual command for flushing the system dns using command prompt is ipconfig/flushdns. Is there anyway to do the same flush operation from java? Any java function to perform the same flush dns operation?


回答1:


You may want to run the same command using Java as:

     Process p= Runtime.getRuntime().exec("cmd /c ipconfig /flushdns"); 


来源:https://stackoverflow.com/questions/17150245/flush-dns-using-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!