资 源 简 介
import java.net.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class NetTool {
InetAddress myIPaddress = null;
InetAddress myServer = null;
public static void main(String args[]) throws Exception{
NetTool mytool;
mytool = new NetTool();
System.out.println("Your host IP is: " +
mytool.getMyIP());
System.out.println("The Server IP is :"
+ mytool.getServerIP());
System.out.println("Your Mac Address is: " +
mytool.getMACAddress());
}
//取得