1、写一个批处理文件,文件名为:run.dat内容为:

************************************************

%1% 
pause 

************************************************

2、Runtime.getRuntime().exec("cmd.exe /k start d:\\files\\run.bat  d:\\files\\"+ filename.exe);在java中调用这个命令即可。

这样就可以显示cmd窗口而不是一闪而过。


相关文章:

  • 2021-10-11
  • 2021-12-06
  • 2021-06-26
  • 2021-04-26
  • 2021-12-03
  • 2021-09-02
  • 2021-04-10
猜你喜欢
  • 2021-05-25
  • 2021-05-14
  • 2021-12-10
  • 2022-02-22
  • 2021-10-30
  • 2022-12-23
  • 2021-12-22
相关资源
相似解决方案