使用Java刷新DNS [英] Flush DNS using Java
本文介绍了使用Java刷新DNS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用命令提示符刷新系统dns的通常命令是 ipconfig / flushdns 。
有没有从java执行相同的flush操作?任何java函数执行相同的flush dns操作?
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?
推荐答案
您可能希望使用Java运行相同的命令: p>
You may want to run the same command using Java as:
Process p= Runtime.getRuntime().exec("cmd /c ipconfig /flushdns");
这篇关于使用Java刷新DNS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文