- /**
- * 子进程程序:ProcessBuilder 构建示例使用的固定程序。
- * 启动后向标准输出打印两行文字,随后正常退出(退出码 0)。
- */
- public class Main {
- public static void main(String[] args) {
- System.out.println("Hello from child process!");
- System.out.println("child pid = " + ProcessHandle.current().pid());
- }
- }
|