当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
Java打开外部程序RuntimeProcess
发布时间:2010/6/29 11:16:36 来源:城市学习网 编辑:ziteng
  Runtime r = Runtime.getRuntime();
  try {
  proc = r.exec("cmd /c" + command);
  System.out.println(command + "-->cmd");
  InputStream is = proc.getInputStream();
  byte[] b = new byte[1024];
  is.read(b);
  result.add(new String(b));
  } catch (IOException e) {
  e.printStackTrace();
  }
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved