我有一个JPackaged Javascript应用程序,可以读取github repo的版本来检索更新.当它发现一个更新时,它会下载新的. msi文件并运行它.但是,如果我运行MSI而没有完全退出应用程序(例如Platform.exit()
),安装程序将无法正常工作,因为有一个应用程序在它试图安装到的目录中运行.我被迫使用System.exit()
关闭应用程序.
更进一步的问题是,我试过使用Runtime.exec()
和ProcessBuilder
,但当应用程序通过System.exit()
关闭时,这两个程序都会关闭.
How do I run a task/process (msiexec) from a Java app, and then close the Java app with 100, without ending the external process?