title: How to save and close the applications using cmd or atleast using java program?
body: <p>I can kill some applications in cmd using command taskkill /F /IM program_name.exe
  But before killing any applications i want to save whatever the work has been done. 
  EX: kill the Microsoft word, but before that I want to save it. How can I do it through cmd?</p>
  
  <p>Give me an idea. If it is not possible, even through Java also ok for me.</p>
  
  <p>Thanks in advance.</p>