在eclipse中找不到Remote Shell

时间:2013-12-28 08:29:51

标签: android eclipse eclipse-plugin

我想做一些我需要 shell in eclipse 的工作,但我无法在任何地方获得它。

我试过了: 窗口>显示视图>其他 但我在那边没有任何选择。

我应该为shell下载一些东西,还是做任何设置来获取shell?

提供任何链接。 谢谢。

2 个答案:

答案 0 :(得分:0)

您需要安装Eclipse RSE(远程系统资源管理器)才能获得此支持。

转到Help > Install New Software,选择要使用的Eclipse版本。 RSE位于Mobile and Device Development部分。

答案 1 :(得分:0)

您也可以使用java代码访问

Process p;
p = Runtime.getRuntime().exec("//enter Your shell Command here");
p.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(
p.getInputStream()));
StringBuffer sb = new StringBuffer();
String line = reader.readLine();
sb.append(line);
while (line != null) {
    line = reader.readLine();
    sb.append(line);
    }
System.out.println(sb.toString());//ur shell command result