1. 梗概:
Runtime处于java.lang包中, 主要用于执行文件
2. 步骤:
- 通过静态方法创建Runtime对象
- 使用类方法exec()执行文件
3. 创建Runtime对象:
3.1. 使用类的静态方法getRuntime():
其返回一个Runtime对象
4. 运行可执行文件:
4.1. 使用类方法: Runtime.exec(String command)
command即某一个文件的绝对路径
Runtime处于java.lang包中, 主要用于执行文件
其返回一个Runtime对象
command即某一个文件的绝对路径