windows - How can my java app detect if its being blocked by firewall -
i have created application desktop using java works server , accepts incoming connections using serversocket
. software works on lan , needs allowed firewall. how can check within app if being blocked pc's firewall ?
you can try connect reliable site eg stackoverflow.com
try { new socket("stackoverflow.com", 80); } catch (ioexception e) { // wrong, not firewall problem ... } // no firewall
Comments
Post a Comment