Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9202

Re: Ping from JAVA to IP Address

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!nntp.amis.hr!news.metronet.hr!not-for-mail
From Screamin Lord Byron <scre@min.dot>
Newsgroups comp.lang.java.programmer
Subject Re: Ping from JAVA to IP Address
Date Wed, 26 Oct 2011 13:16:53 +0200
Organization Metronet
Lines 29
Message-ID <j88q75$8d5$1@news.metronet.hr> (permalink)
References <670cd44b-d05f-4300-9c59-b26f28e17323@j36g2000prh.googlegroups.com> <9gloupFf3oU1@mid.individual.net> <j84mmv$6b7$1@dont-email.me> <0aec9e49-b7d2-4afd-9f8f-07a2d07392ca@k13g2000prg.googlegroups.com> <26b57282-aa91-4116-884c-92af6ae1f911@k38g2000pro.googlegroups.com> <j86jl3$tvd$1@dont-email.me> <wlhabwd73x60$.1qs46lbqszfoq.dlg@40tude.net> <j87f5m$12g$1@dont-email.me>
NNTP-Posting-Host 78.134.159.249
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-2
Content-Transfer-Encoding 7bit
X-Trace news.metronet.hr 1319627813 8613 78.134.159.249 (26 Oct 2011 11:16:53 GMT)
X-Complaints-To abuse@metronet.hr
NNTP-Posting-Date Wed, 26 Oct 2011 11:16:53 +0000 (UTC)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
In-Reply-To <j87f5m$12g$1@dont-email.me>
X-Enigmail-Version 1.3.2
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9202

Show key headers only | View raw


On 26.10.2011 01:02, markspace wrote:
> On 10/25/2011 1:13 PM, Screamin Lord Byron wrote:
>>
>> Did you read my post? It doesn't work because apparently there is no
>> support for raw sockets in Java
> 
> 
> I'm not sure the RFE relates to fixing existing functionality like
> isReachable(). 

It doesn't. Not directly, at least. It's an implementation issue.

> I read that as a totally different bug, one that was
> asking for a brand new, direct API for ICMP.  It could be the same as
> asking to "fix" isReachable(), but I don't think it's certain at all
> that it does.

If I understand it correctly, this functionality is no longer
implemented since Java 1.3. The InetAddress class was there since Java
1.0. The documentation states: "A typical implementation will use ICMP
ECHO REQUEST...". But since Java 1.3 the ICMP ECHO REQUEST is no longer
an option. I'm guessing they just couldn't be bothered to change that
documentation line.

It is a reasonable explanation on why the code posted by Salim doesn't
work. It works within the same subnet though, but that's because of the
TCP connection on port 7, not ICMP ping.

The bottom line is, as Roedy put it, you can't ping in Java.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Ping from JAVA to IP Address sahm <sahm007@gmail.com> - 2011-10-24 11:01 -0700
  Re: Ping from JAVA to IP Address Robert Klemme <shortcutter@googlemail.com> - 2011-10-24 20:26 +0200
    Re: Ping from JAVA to IP Address markspace <-@.> - 2011-10-24 14:52 -0700
      Re: Ping from JAVA to IP Address sahm <sahm007@gmail.com> - 2011-10-24 22:31 -0700
        Re: Ping from JAVA to IP Address sahm <sahm007@gmail.com> - 2011-10-25 01:56 -0700
          Re: Ping from JAVA to IP Address Screamin Lord Byron <scre@min.dot> - 2011-10-25 11:57 +0200
          Re: Ping from JAVA to IP Address markspace <-@.> - 2011-10-25 08:12 -0700
            Re: Ping from JAVA to IP Address Screamin Lord Byron <scre@min.dot> - 2011-10-25 22:13 +0200
              Re: Ping from JAVA to IP Address markspace <-@.> - 2011-10-25 16:02 -0700
                Re: Ping from JAVA to IP Address Screamin Lord Byron <scre@min.dot> - 2011-10-26 13:16 +0200
              Re: Ping from JAVA to IP Address Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 15:29 -0500
                Re: Ping from JAVA to IP Address glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-07 08:59 +0000
  Re: Ping from JAVA to IP Address Roedy Green <see_website@mindprod.com.invalid> - 2011-10-25 21:28 -0700
  Re: Ping from JAVA to IP Address Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 15:36 -0500

csiph-web