atitit.基于bat cli的插件管理系统.doc

/AtiPlatf/src_atibrow/com/attilax/cmd/CmdX.java

pathx.isWebPathMode=true;

String bat=pathx.classPathParent()+"/other/del_indexs.bat";

bat=bat.replace("/", "\\");

String cmd=" cmd.exe /c \""+bat+"\"";

System.out.println(cmd);

String r=exe(cmd);

System.out.println("----echo:"+r);

System.out.println("--f");

作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙,  EMAIL:1466519819@qq.com

转载请注明来源: http://www.cnblogs.com/attilax/

public static String exe(String cmd) {

try {

String r = "";

// 执行 CMD 命令

Process process = Runtime.getRuntime().exec(cmd);

//System.out.println("--echo stdin info:");

r = echoCmdResult_asStr(process.getInputStream());

//System.out.println("--echo err info:");

r = r + "\r\n" + echoCmdResult_asStr(process.getErrorStream());

//System.out.println("cmd ext finish!");

return r;

} catch (Exception e) {

throw new RuntimeException(e);

}

}

private static String echoCmdResult_asStr(InputStream cmdStream)

{

String r="";

BufferedReader reader = null;

// BufferedReader reader;

InputStreamReader inputStreamReader;

try {

inputStreamReader = new InputStreamReader(cmdStream,

"gbk");

} catch (UnsupportedEncodingException e) {

// TODO Auto-generated catch block

e.printStackTrace();

throw new RuntimeException(e);

}

reader = new BufferedReader(inputStreamReader);

String line = null;

try {

line = reader.readLine();

} catch (IOException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

while (line != null) {

//System.out.println(line);

r=r+"\r\n"+line;

try {

line = reader.readLine();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

if (reader != null) {

try {

reader.close();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

return r;

}

Cank

atitit.插件体系设计总结o73.doc - attilax的专栏 - 博客频道 - CSDN.NET.htm

Atitit 插件机制原理与设计微内核 c# java 的实现attilax总结 - attilax的专栏 - 博客频道 - CSDN.NET.htm

atitit.基于bat cli的插件管理系统.doc的更多相关文章

  1. atitit.基于  Commons CLI 的命令行原理与 开发

    atitit.基于  Commons CLI 的命令行原理与 开发 1. 命令行支持的格式有以下几种: 1 2. json化,map化的命令行参数内部表示 1 3. Ati cli 2 4. CLI库 ...

  2. Atitit 基于图片图像 与文档混合文件夹的分类

    Atitit 基于图片图像 与文档混合文件夹的分类 太小的文档(txt doc csv exl ppt pptx)单独分类 Mov10KminiDoc 但是可能会有一些书法图片迁移,因为他们很微小,需 ...

  3. Atitit.基于dsl的methodinvoker

    Atitit.基于dsl的methodinvoker V2 new dyn  invoke V3 plan Meth chain Prj  cms methd_invok.bat rem a  sta ...

  4. Atitit.hybrid混合型应用 浏览器插件,控件的实现方式 浏览器运行本地程序的解决方案大的总结---提升用户体验and开发效率..

    Atitit.hybrid混合型应用 浏览器插件,控件的实现方式 浏览器运行本地程序的解决方案大的总结---提升用户体验and开发效率.. 1. hybrid App 1 1.1. Hybrid Ap ...

  5. Atitit 基于sql编程语言的oo面向对象大规模应用解决方案attilax总结

    Atitit 基于sql编程语言的oo面向对象大规模应用解决方案attilax总结 1. Sql语言应该得到更大的范围的应用,1 1.1. 在小型系统项目中,很适合存储过程写业务逻辑2 1.2. 大型 ...

  6. Atitit  基于meta的orm,提升加速数据库相关应用的开发

    Atitit  基于meta的orm,提升加速数据库相关应用的开发 1.1. Overview概论1 1.2. Function & Feature功能特性1 1.2.1. meta api2 ...

  7. Atitit 基于dom的游戏引擎

    Atitit 基于dom的游戏引擎 1. 添加sprite控件(cocos,createjs,dom)1 1.1.1. Cocos1 1.1.2. createjs1 1.1.3. Dom模式2 1. ...

  8. atitit.基于http json api 接口设计 最佳实践 总结o7

    atitit.基于http  json  api 接口设计 最佳实践 总结o7 1. 需求:::服务器and android 端接口通讯 2 2. 接口开发的要点 2 2.1. 普通参数 meth,p ...

  9. ExtJS4.2学习(13)基于表格的扩展插件---rowEditing

    鸣谢:http://www.shuyangyang.com.cn/jishuliangongfang/qianduanjishu/2013-11-24/182.html --------------- ...

随机推荐

  1. Codeforces Round #109 (Div. 2) A. I_love_%username%【打擂台算法/满足当前数字在已经出现的数字的最大值和最小值之间的个数】

    A. I_love_%username% time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  2. Ansible 删除多个文件或目录

    翻译和转载该网页内容 http://www.mydailytutorials.com/ansible-delete-multiple-files-directories-ansible/ 背景 ans ...

  3. 离别在须臾——AFO

    始于 2016-12-25 终于 2017-11-30 一开始就陷入了颓废的坑,然后,直至 2017 年暑假,颓废的气息一发不可收拾, 从 Q_fight 到 aoqi_baitian ,从 大主宰 ...

  4. TestList汇总

    [基本类型] 类的构造方法调用问题 重载复写的区别 Final finally finalized 的区别 定义final变量是否需要初始化 forward和redirect的区别 equals方法和 ...

  5. [CTSC2018]假面(概率DP)

    考场上以为CTSC的概率期望题都不可做,连暴力都没写直接爆零. 结果出来发现全场70以上,大部分AC,少于70的好像极少,感觉血亏. 设a[i][j]表示到当前为止第i个人的血量为j的概率(注意特判血 ...

  6. [BZOJ 2547] 玩具兵

    Link: BZOJ 2547 传送门 Solution: 很容易通过解可行性的单调性想到二分答案,接下来考虑如何验证解 发现一个很奇妙的条件:步兵和骑兵的个数相同 因此交换位置时不用考虑可行性,保证 ...

  7. 四. Java继承和多态7. Java static关键字

    static 修饰符能够与变量.方法一起使用,表示是“静态”的. 静态变量和静态方法能够通过类名来访问,不需要创建一个类的对象来访问该类的静态成员,所以static修饰的成员又称作类变量和类方法.静态 ...

  8. Tiny6410下的第一个Linux驱动程序

    Linux系统环境是照着友善之臂的教程搭建的 //Hello  World驱动程序源文件 #include <linux/miscdevice.h> #include <linux/ ...

  9. 磁盘爆满导致MySQL无法启动:Disk is full writing './mysql-bin.~rec~' (Errcode: 28). Waiting for someone to free space...

    今天收到监控邮件说博客访问失败.打开页面一看,硕大的502 Bad Gateway,ping了一下VPS发现是通的,SSH连接上去看了下Nginx日志发现没问题,重启lnmp的时候发现Mysql起不来 ...

  10. 遍历Map的四种方式

    方法一 在for-each循环中使用entries来遍历 这是最常见的并且在大多数情况下也是最可取的遍历方式.在键值都需要时使用. 注意:for-each循环在java 5中被引入所以该方法只能应用于 ...