1

I have to show deployment date of application in report generated by application for that I have to fetch deployment date of war file using java code. How can I fetch the deployment date of application(.war) using Java code. Any suggestion will be appreciated.

Sai prateek
  • 11,842
  • 9
  • 51
  • 66

1 Answers1

1

using JDK 7 you can read the file attributes like the creation date,so reading the file attributes of the war file should serve the purpose.

Please,refer Determine file creation date in Java

Community
  • 1
  • 1
KDP
  • 1,481
  • 7
  • 13
  • I think you need to connect server for determining creation date of war file. – ManojP Jun 24 '15 at 05:09
  • KDP: for that we have to find deployment path, but that will not be accessible for every user which could be cause of access exceptions. Any other way? – Sai prateek Jun 24 '15 at 05:46
  • the other way would be provide some web service or a method so the users can call and get the required info. – KDP Jun 24 '15 at 05:56