调用aix下的sh文件
来源:互联网 发布:淘宝口令红包怎么设置 编辑:程序博客网 时间:2024/05/20 14:41
public void process() {
File wd = new File("/bin");
System.out.println(wd);
String cmdPath = "cd /pdmdata2/cluster1/apps";
Process proc = null;
try {
proc = Runtime.getRuntime().exec("/bin/ksh", null, wd);
} catch (IOException e) {
e.printStackTrace();
}
if (proc != null) {
BufferedReader in = new BufferedReader(new InputStreamReader(proc
.getInputStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(proc.getOutputStream())), true);
out.println(cmdPath);
out.println("pwd");
out.println("/refreshcache.sh");
out.println("exit");
try {
proc.waitFor();
in.close();
out.close();
proc.destroy();
} catch (Exception e) {
e.printStackTrace();
}
}
}
- 调用aix下的sh文件
- 调用aix下的sh文件
- Shell 调用sh文件里的函数
- linux调用sh文件的基本操作
- aix下将sh加入启动项
- AIX执行.sh文件 ksh not found
- python 调用sh文件
- linux下执行.sh文件的方法
- window下执行.sh文件的方法
- linux下如何运行.sh的文件
- Linux下查找.sh后缀的文件
- linux中sh与py文件的相互调用关系
- Linux 下编写.sh文件运行JAR下的Class
- linux 下 .sh 文件语法
- linux 下 .sh 文件语法
- linux 下 .sh 文件语法
- linux 下 .sh 文件语法
- linux下.sh文件语法
- FLEX tree动态获得信息时遇到的问题总结
- 男人永远也不敢说的后半句话
- 写给朋友们的一封信
- 带搜索功能的GridView控件
- 汇编的hello world
- 调用aix下的sh文件
- php gettext方式实现UTF-8国际化多语言(i18n)
- UTF-8, Unicode, GB2312格式串转换之C语言版
- 初学Labview遇到的一些问题
- opencv保存图象
- 开张了
- [转]64位Windows和32位Windows有何不同?
- DataFactory生成大数据量
- 关于TCP长连接的一些简单代码