seeing if a site is up

D

Dave Milne

a surprising omission from java, I always thought. But thinking about it
more, IIRC you need root privileges in unix to create raw packets, so that's
probably why.

Dave Milne, Scotland
'91 Grand Wagoneer, '99 TJ
 
D

Dag Sunde

Roland said:
From Java?
Yep, in Java 5.0 (aka 1.5.0) you can use InetAddress.isReachable(). This
sends ICMP ECHO requests to the address. [Most (all?) ping command
implementations use the same ICMP requests to check if the address is
reachable.]

<http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html#isReachable(int)>

As long as the OP is restricted to the Applet's sandbox this doesn't help
much, since it is the permission problem with cross-domain access from
an applet he is truggling with...

I presume here that Java 5.0's "InetAddress.isReachable()" will trigger
a permission denied, just as opening an URL() will...?
 
D

Darren

Dave Milne said:
a surprising omission from java, I always thought. But thinking about it
more, IIRC you need root privileges in unix to create raw packets, so that's
probably why. I have root privileges :)

Dave Milne, Scotland
'91 Grand Wagoneer, '99 TJ
 
J

Joan

Dave Milne said:
a surprising omission from java, I always thought. But thinking
about it
more, IIRC you need root privileges in unix to create raw
packets, so that's
probably why.

Dave Milne, Scotland
'91 Grand Wagoneer, '99 TJ

So tell you boss you can't do it without this privilege and make
her decide!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top