开发者

traceroute command not working in android

I am trying to execute traceroute command following way:

Runtime r = Runtime.getRuntime();
Process p = r.exec("traceroute  google.com");
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((inputLine = in.readLine()) !=开发者_Python百科 null) {
            Log.d(tag,inputLine);
}

But it is giving me the following error:

java.io.IOException: Error running exec().

Commands: [traceroute, 202.164.36.66]

Working Directory: null

Environment: null

It works fine for ping or any other command of linux, please help.


There is no Traceroute installed on the device, so this will not work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜