networking problem :-( ????

Jonk kulsh

Greenhorn

Posts: 7

posted 11 years ago

The code given below is working for windows but its giving problem in MAC OS In window platform its revaling host address & name if u given address or name of particular comp in network but cudn't revaling the name or ip address of MAC OS on the network,while in MAC OS this code ain't workn at al

java.net.UnknownHostException: datacentre: datacentre at java.net.InetAddress.getAllByName0(InetAddress.java:948) at java.net.InetAddress.getAllByName0(InetAddress.java:918) at java.net.InetAddress.getAllByName(InetAddress.java:912) at java.net.InetAddress.getByName(InetAddress.java:832) at GetInetInfo.main(GetInetInfo.java:12)

cudn't revaling the name or ip address of MAC OS on the network,while in MAC OS this code ain't workn at al

To be honest, it sounds like the Mac isn't on the network. Try using some command line tools to double-check if its visible before worrying about your Java code (e.g. in Windows ping, nslookup, net view etc.)