我有 Java申请,例如需要重新启动(但还需要启动其他进程)。 目前,通过关闭目前的申请,然后利用ShutdownHook和一个工序开始一个新案例。
我现在的问题是,新进程在某种背景下运作,没有自己的光辉窗口。 在窗户机器上,可以使用新的黄色窗口。
cmd /c start "windowtitle" java -jar myApp.jar
但是,这产生了2个进程: cm碎过程和 j进程始于启动。 举例来说,这使得启动进程的 st和梯子无法走下去,因为我们只能把这些溪流用于细化进程,而不是从开始指挥开始。
The very best solution for me would be to reuse the current console window for the new process but this seems somehow impossible to achieve as i did not find any information on how to do this. Additionally I would appreciate a solution which works on Unix machines.