使用Runtime.getRuntime().exec()方法时要注意Working Directory
2010-07-20 19:04
447 查看
使用Runtime.getRuntime().exec()方法时要注意Working Directory
如果不设定Working Directory,被调用shell进程的工作目录就是调用进程的工作目录
设定方法是:使用以下方法调用
Runtime.getRuntime().exec(command, envp, dir), dir就是工作目录
如果不设定Working Directory,被调用shell进程的工作目录就是调用进程的工作目录
设定方法是:使用以下方法调用
Runtime.getRuntime().exec(command, envp, dir), dir就是工作目录
相关文章推荐
- 使用Runtime.getRuntime().exec()方法的几个陷阱 (转)
- Runtime.getRuntime().exec()方法的使用
- Runtime.getRuntime().exec(...)使用方法
- Runtime.getRuntime().exec(...)使用方法
- Android Runtime.getRuntime().exec() 使用方法
- Runtime.getRuntime().exec(...)使用方法
- Runtime.getRuntime().exec(...)使用方法
- 使用Runtime.getRuntime().exec()方法的几个陷阱
- 使用Runtime.getRuntime().exec()的方法调用本地mysqldump.exe备份还原数据库(路径中含有空格和数字)的方法
- [转]使用Runtime.getRuntime().exec()方法的几个陷阱
- 使用Runtime.getRuntime().exec()方法的几个陷阱 (转)
- iOS 使用class_copyPropertyList等runtime方法的注意事项
- Eclipse下使用Runtime.getRuntime().exec启动java程序的问题
- java Runtime.getRuntime().exec 调用系统脚本/命令注意事项
- Java Process中waitFor()的问题(使用Runtime.getRuntime().exec(...)时)
- Runtime.getRuntime().exec(cmd)使用不当引起的java.io.IOException: Too many open files
- Eclipse下使用Runtime.getRuntime().exec启动java程序的问题
- Runime.getRuntime().exec()中执行任意命令的两种方法
- 用Runtime.getRuntime().exec()需要注意的地方
- 关于Android中Runtime.exec()方法的使用误区