Question Locked

How to check internet connection through java program

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi,
I am currently doing a project in the area of web service.In this I have to access the service when connected to the internet.
But i like to create this service automatic. I need a program to indicate whether connection available or not and always it has to be in running state. when connection available my function automatically invoke the service.

3 replies

by slayer_

Or you can try and ping a website through code, or simply try connecting to the web service, if connection fails, then internet is not available.

by jaga.mcaproj

i tried for IP address. if my system in offline then it through an exception and closed the program.
but i want the program run continously even the system in offline.

This discussion is closed to new replies.