java - How to connect to a wireless network programmatically? -
i have java application , 2 different wireless network connections (wifi) on desktop. desktop application, not android.
one method of applicaiton works wifi1
, second method works wifi2
.
so far in order use different methods have change wifi settings on desktop manually.
is there way change wifi connection setting application programmatically ?
java high-level, platform-independent programming language. network settings, , how control them depend on operating system, , knowledge there no simple way expose in java.
' luckily, platform-dependent code mixed java can achieve result you're after.
the java
see runtime.exec() method, allows access windows command line or mac/linux terminal.
the windows (adjust other os'es)
now have access command line, have run proper, platform-specific command. see this tutorial windows.
note not idea modify user's network settings (or else external application) without consent.
Comments
Post a Comment