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.

  1. the java

    see runtime.exec() method, allows access windows command line or mac/linux terminal.

  2. 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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -