Finding SSID of a wireless network with Java

You can’t access this low-level details of the network in Java. You can get some details of the network interface with the NetworkInterface class but if you see at the provided methods, no one is related to Wifi networks nor any way to get the SSID is provided. As pointed below, you should use some native functionality through calling a native library with JNI or by calling a OS tool with Runtime.

Java is not designed to do that kind of things, is hard to implement in a platform-independent way and any hardware-level detail can not be managed in Java by principle.

Same applies to other networks like 3G, GPRS… the application should not be aware of the connection type nor its details. Java can only manage things at the Transport (TCP) level, not the network (IP) not Link (3G, Wifi, Ethernet…), so you can only manage sockets.

Leave a Comment