try {
Runtime
.getRuntime()
.exec(
"Netsh interface ip set address \"本地连接\" static 192.168.100.33 255.255.255.0 192.168.100.1 1");
} catch (Exception e) {
System.out.println(e.getMessage());
}
192.168.100.33 ---修改后的IP
255.255.255.0 ---子网掩码
192.168.100.1 ---默认网关
1 ---哈哈,不知道,网上找来的
测试能用哦。。。