link state notification in Java
Is there any way in Java to receive event notifications whenever link state changes on a computer (connected, disconnected开发者_StackOverflow社区, up, down, etc)? Thanks!
There is no platform-independent mechanism which accomplishes this in Java. However, you can use JNI to do it. For example, Windows allows you to poll (or be notified of) network interface states using the Network Location Awareness (NLA) API.
精彩评论