修改IP地址
利用windows api的操作对IP的设置进行管理。
public class IPUtil {public static void main(String[] args) {IPBean bean = new IPBean();//设置IPbean.setNewIP("*********");//设置子网掩码bean.setMask("**********");//设置默认网关bean.setGateway("*********");System.out.println("the process is running...");try {String result = bean.execute();if(result==null||result.trim().equals("")){System.out.println("Success");System.exit(0);}System.out.println(result);} catch (Exception ex) {System.err.println(ex.toString());}}}