Catching system default editor closing event in java

前端 未结 1 707
时光取名叫无心
时光取名叫无心 2021-01-26 05:17

I have a Windows program with the following flow:

generated config file -> user edits config file -> use config file

Ideally I want to la

相关标签:
1条回答
  • 2021-01-26 06:01

    Just figured out the notepad solution -- doh! it was quite obvious :)

    Use Runtime.exec() and Process.waitFor():

    Process p = Runtime.getRuntime.exec("notepad " + filename);
    p.waitFor();
    
    0 讨论(0)
提交回复
热议问题