How to execute the multiple command like "ping","184.108.40.206","date","\t"
Here I want to execute ping and date in Runtime.getRuntime.exec(CmdArray) i.e. two dos commands.
Can you reply with array of CmdArray?
You'll either have to execute Runtime.exec() twice (once for each command) or put the two commands in a script and run the script.
Fair warning: it's not safe to simply say "execute ping". That makes assumptions about your runtime environment that may not always be true. Use the full pathname for the command, instead: e.g.,/usr/bin/ping.
Also note that in Unix-like systems, "ping" doesn't just ping 4 or 5 times and stop like in Windows. Instead, it defaults to pinging forever. You can use the -c option to limit that.
Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.