普通的域名解析方法:
import java.net.*; public class Kkkk { public static void main(String args[]) throws Exception { InetAddress address = InetAddress.getByName("wxh-PC");// wxh-PC是我的计算机名 System.out.println(address); System.out.println("-----"); InetAddress address1 = InetAddress.getLocalHost(); System.out.println(address1); InetAddress[] addresses = InetAddress .getAllByName(" xxxxx xxxx host IN A 127.0.0.1 // 此处就是要更改的地方 AME host ...