Java networking detect network device

How do I use java to detect my network device like router status is on or off. (plug or unplug)


Please help. Thanks
aaronyeo22Asked:
Who is Participating?
 
CEHJCommented:
If your router is connected, normally you'll have a network connection, so you could just try connecting to an address.

See also http://technojeeves.com/joomla/index.php/free/88-what-is-my-ip-java
0
 
aaronyeo22Author Commented:
The automation file has moved. Go here for more information: http://www.whatismyip.com/faq/automation.asp
0
 
aaronyeo22Author Commented:
i just wanna create a simple interface. when the router is connected that will display green light else red light. is is possible do in java.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
CEHJCommented:
>>The automation file has moved

Thanks for bringing that to my attention - now corrected at http://technojeeves.com/joomla/index.php/free/88-what-is-my-ip-java

>>when the router is connected that will display green light else red light. is is possible do in java.

That's just a matter of detail - which you can implement as a result getting/not getting a result from the above code
0
 
ElbasselCommented:
You can ping IP of the router and you can know the result.
http://www.codeguru.com/forum/archive/index.php/t-292939.html
0
 
CEHJCommented:
>>You can ping IP of the router and you can know the result.

That of course won't tell you if you have an internet connection - only that the router is visible on the network
0
 
aaronyeo22Author Commented:
not a solution
0
 
CEHJCommented:
:)
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.