Main.java 373 B

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