JAVA called Windows CMD an issue out of a master
Abstract: JAVA called Windows CMD an issue out of a master
I would like to ask what, how JAVA call the ping command windows, all LAN know whether the machines boot?
Process p = Runtime.getRuntime (). Exec ( "ping 127.0.0.1-t");
How to get inside?
Or master of a better method in the entire LAN can not install any software that the circumstances whether terminals boot? ?
Award-100 correct answers. . . . (Sub-small, but to me the really big help. Thank you all!)
Ping content can be output as how determine whether the boot to deal with:
Int read;
Try (
Process ps = Runtime.getRuntime (). Exec ( "ping 127.0.0.1");
InputStream is ps.getInputStream = ();
While ((read = is.read ())! = -1) (
System.out.print ((char) read);
)
)
Catch (IOException ex) (
Ex.printStackTrace ();
)
Louzhu you will not use JAVA the udp ah, if we can use PING to prepare a similar function.
But if the other machines have a firewall, then what not to use.
Check this, you solve the issue of integrity
When Runtime.exec () won't
Concerned about this issue. Very funny.
I was the UDP, but not J2SE Hendong network programming. . . Testing is really my style code. . . .
Zhenwofengcai 100 points in mind, there is a problem, how can JAVA judgement is not MSSQL database server has been in operation, whether the source data has been normal? In a thread in the implementation. . . Please help more!
100 at the same gift. . .
↑ Back
Tags: Master, out source
Releated Java Articles
June 25, 2007 | Filed Under Advanced Topic |






