> Hi,
>
> i am trying to execute below code from solaries platfrom
Solaris?
> InetAddress addy = InetAddress.getByName(ipaddress);
> try {
[quoted text clipped - 5 lines]
> i am trying to ping to the apddress but it is giving false even though
> the machine(windows platform) is up
The API docs say:
"Test whether that address is reachable. Best effort is made by the
implementation to try to reach the host, but firewalls and server
configuration may block requests resulting in a unreachable status while
some specific ports may be accessible. A typical implementation will use
ICMP ECHO REQUESTs if the privilege can be obtained, otherwise it will
try to establish a TCP connection on port 7 (Echo) of the destination host."
I conclude that at least one of the following is true:
* Your "ipaddress" doesn't contain what you think it does.
* Your "false" result wasn't generated by the quoted code.
* Your target computer is behind a firewall
* Your target computer has internal firewalling enabled.
* Your target computer is not listening on port 7.
I'd check all the above, if still baffled I'd then post an SSCCE (see
http://sscce.org/)

Signature
RGB
Roedy Green - 25 Apr 2008 13:02 GMT
On Fri, 25 Apr 2008 09:46:34 +0100, RedGrittyBrick
<RedGrittyBrick@SpamWeary.foo> wrote, quoted or indirectly quoted
someone who said :
>I'd check all the above, if still baffled I'd then post an SSCCE (see
>http://sscce.org/)
you can also snoop on what your program is sending and getting back.
That may give a clue. See http://mindprod.com/jgloss/sniffer.html

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com