· 7 years ago · Oct 11, 2018, 11:10 PM
1Runtime rt = Runtime.getRuntime();
2 Process p = null;
3
4 try {
5 p = rt.exec("cmd.exe /c "netsh interface ip set address "Wi-Fi" static 192.168.1.12 255.255.255.0 192.168.1.1"");
6 } catch (Exception e1) {
7 e1.printStackTrace();
8 }
9
10Pinging google.sk [172.217.23.195] with 32 bytes of data:
11Request timed out.
12Request timed out.
13Request timed out.
14Request timed out.
15
16Ping statistics for 172.217.23.195:
17Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
18
19Wireless LAN adapter Wi-Fi:
20
21Connection-specific DNS Suffix . :
22Description . . . . . . . . . . . : Broadcom 802.11n Network Adapter
23Physical Address. . . . . . . . . : 60-D7-19-4C-C4-98
24DHCP Enabled. . . . . . . . . . . : No
25Autoconfiguration Enabled . . . . : Yes
26Link-local IPv6 Address . . . . . : fe80::96ae:56a7:3e1e:adfa%10(Preferred)
27IPv4 Address. . . . . . . . . . . : 192.168.1.12(Preferred)
28Subnet Mask . . . . . . . . . . . : 255.255.255.0
29Default Gateway . . . . . . . . . : 192.168.1.10
30DHCPv6 IAID . . . . . . . . . . . : 258002017
31DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-A4-32-48-DC-0E-A1-1C-A2-BD
32DNS Servers . . . . . . . . . . . : 192.168.1.1
33Primary WINS Server . . . . . . . : 192.168.1.1
34NetBIOS over Tcpip. . . . . . . . : Enabled