package yufeifei;


import java.io.IOException;

import java.util.*;


/**

* @author YuFeifei

* @version 2017年11月15日 下午2:55:55

* 类说明

* java 操作cmd 命令

*/

public class TestCmd {

public static void main(String agrs[]){

/**启动夜神模拟器*/

String yeShen = "Nox.exe";

/**adb连接设备*/

//String command = "adb connect 127.0.0.1:62007";

/**启动appium*/

//String appium = "appium -a 127.0.0.1 -p 4723 -U 127.0.0.1:62001";

try {

Runtime.getRuntime().exec("cmd.exe /C " + yeShen);

//Runtime.getRuntime().exec("cmd.exe /C " + command);

//Runtime.getRuntime().exec("cmd.exe /C " + appium);

}catch(IOException e){

e.printStackTrace();

}

}

}

// public static void main(String agrs[]){

// //输入数组agrs的长度

// System.out.println(agrs.length);

// //遍历数组agrs的所有元素

// // for (循环变量类型 循环变量名称 : 要被遍历的对象)  循环体

// for (String agr :agrs){

//

// System.err.println(agr);

// }

// }

// public static void main(String agrs[]){

// /**建立一个数组integers*/

// int[] integers = {1,2,3,4,5,6,7,8,9};

// /**遍历数组*/

// for (int i : integers){

// System.out.println(i);

// }

//

// }

// public static void main(String agrs[]){

// Scanner scanner = new Scanner(System.in);

// System.out.println("请输入你的×××号码:");

// String line = scanner.nextLine();

// System.out.println("你的×××号码是" + line.length() + "位数字呀!");

// }