Java Program to Display All IP Addresses in LAN
Hi Sir, I Want to Develop Network Scanner Software. For that i need "Java Program to Display All IP Addresses in LAN". Please, any one help me......
|
Before people start bashing you here ;) I would like to state that this is NOT the way
LQ goes, you need to SHOW your efforts, through code or through algorithms, what you have read till now and where you are stuck etc. Welcome to LQ. |
java program to display all ip addresses in lan
import java.util.*;
import java.lang.*; import java.net.*; public class GetOwnIP { public static void main(String args[]) { try{ InetAddress ownIP=InetAddress.getLocalHost(); System.out.println("IP of my system is := "+ownIP.getHostAddress()); }catch (Exception e){ System.out.println("Exception caught ="+e.getMessage()); } } } This code shows only my system IP address.But, i want to display all systems IP addresses connected in my LAN Network. Please help me with code.... |
Do you know the Network Range you are on. If not you would need to get your subnet to calculate the ip range. After you know the range you are looking for you can check out the link for icmp pinging. This might not work if firewalls don't allow ICMP responses.
http://www.0x13.de/index.php/code-sn...g-in-java.html |
All times are GMT -5. The time now is 03:12 AM. |