Tag: processbuilder

将String作为params从一个Java App传递到另一个Java App

我正在尝试将String作为参数从一个Java Aplications传递到第二个作为StartUp参数 例如,我有必须在System.exit(0);之前调用启动另一个Java Aplication(仅包含JOptionPane,JDialog或简单JFrame)的System.exit(0); ,我试图从关闭应用程序发送一些描述到另一个, 这些代码是模拟我尝试过的,在这种forms下,代码正常工作并将字符串显示到JTextArea … import java.io.IOException; import java.util.concurrent.*; public class TestScheduler { public static void main(String[] args) throws InterruptedException { ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(10); executor.setContinueExistingPeriodicTasksAfterShutdownPolicy(true); executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(true); for (int i = 0; i < 10; i++) { final int j = i; System.out.println("assign : " + i); ScheduledFuture future = executor.schedule(new Runnable() […]