Retrieve name of current wireless network

Please let me know how I can retrieve the name of the wireless network my machine is currently connected to, through Java code.

Thanks!
dshrenikAsked:
Who is Participating?
 
CEHJCommented:
Try to find out, for your OS, how to do it at the command line and then Runtime.exec the utility in question
0
 
for_yanCommented:
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
George K.Commented:
This must be exactly what you are looking for: http://www.monolith81.de/mognet.html
It 's open source in java.
0
 
George K.Commented:
0
 
for_yanCommented:
This last references is for modile devices which have naturally much more available Java resources for wireless communication.
I understood that original question was about general Windows machine.
0
 
dshrenikAuthor Commented:
That's right, I want it for a Windows machine.
Will be great if it works for a Max as well.
0
 
for_yanCommented:

As I mentioned, that seems to be not that trivial task especialy in the world of free java,
again references to the same jwlanscan or not very
obvious hints about getting from the syste with Runtime.getRuntim().exec(...);
and some folks even more pessimistic, see here on the same subject:

http://stackoverflow.com/questions/5378103/finding-ssid-of-a-wireless-network-with-java
0
 
for_yanCommented:


http://osxdaily.com/2007/01/18/airport-the-little-known-command-line-wireless-utility/

looks liket this arirport command together with
Runtime.getRuntime().exec(...)
can really help you on Mac - check if the command really works on your MAC
0
 
for_yanCommented:
On windows try

ipconfig /all

or

netsh

Don't know if those are showing SSID for wireless networks, and I cannot check right now
as I don't have any wireless connections now.

As this seesm to ne not very popular task to determine SSID on non-mobile devices,
can you explain why do you need it?
Maybe what you need can be achieved through some other means, that's why most of the folks
were not very interested in SSID names?


 
0
 
for_yanCommented:

some folks claim that it will print it on Vista (and maybe on Windows 7) with this command:

netsh wlan show networks mode=bssid

but on XP it does not know
netsh wlan
command

http://www.howtofixcomputers.com/forums/windows-xp/display-ssid-command-line-79146.html
0
 
for_yanCommented:
It looks like this tool can help with this task on XP

http://www.symantec.com/connect/articles/how-capture-and-deploy-wlan-profiles

even looks like it is free though it is from Symantec
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.