问题
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