更新时间:2023-09-29 22:54:10
将文件复制到临时位置并运行它是可行的方法。您链接到的答案会做更多必要的工作,因为您可以将您的exe文件作为InputStream并将其复制到具有Apache Commons IO FileUtils.copy(in,out)等实用程序的文件中/ code>
Copying the file to a temporary location and running it is the way to go. The answer you linked to does much more work that necessary, as you can get your exe file as an InputStream and copy it to a file with a utility like Apache Commons IO FileUtils.copy(in, out)