I have a Java program that needs to run on Windows and get some information about the wireless network that it's running on. Specifically, it needs to know the network's SSID and the type of wireless encryption being used.
Java obviously doesn't have normal access to this information, so I'm forced to run a command and parse the output. In particular, I run
netsh wlan show interfaces
This gives me the information I need, but the solution seems to be very fragile. In particular, I need to parse the command output for strings such as "SSID" and "Authentication". I'm concerned that when I try to run this on a non-English version of Windows, my solution won't work.
Does anyone have any ideas on how I can do this better?