在java程序中运行命令行命令:
String commands = "/home/huang/summerProject/demo/test_full.sh";
Process process = Runtime.getRuntime().exec (commands);
本文介绍了一种在Java程序中执行Shell脚本的方法。通过使用Runtime类的getRuntime方法获取当前运行时环境,并调用exec方法执行指定的Shell命令。
在java程序中运行命令行命令:
String commands = "/home/huang/summerProject/demo/test_full.sh";
Process process = Runtime.getRuntime().exec (commands);
6018

被折叠的 条评论
为什么被折叠?