My app is a straightforward Java SE 6 program, built in Eclipse and distributed as a single executable jar (I don't need or use any advanced build tools such as ant).
I want to automate the process of getting accurate version information into the "About" message, because right now I have to remember to open the main class and update a version String every time I rebuild the app.
Ideally I'd like to automatically insert the date/time when the code (or the jar) was built into something I can access at runtime, but any workable approach would do.
For quite a while now I've been using my own hosted nextcloud server for both mobiles and PCs/laptops. Also all my personal systems run windows 11 pro for workstation or windows 11 ltsc. All using local accounts. What annoys me is that MS keeps trying to force you to "use this (MSA) account system wide". Everything at home is on my own DC/AD. Why is this even a question? Why is MS forcing this onto people? Sure for windows home versions do whatever you want. But for pro/ pro for workstation or ltsc no. Just don't.
Question
JamesCherrill
My app is a straightforward Java SE 6 program, built in Eclipse and distributed as a single executable jar (I don't need or use any advanced build tools such as ant).
I want to automate the process of getting accurate version information into the "About" message, because right now I have to remember to open the main class and update a version String every time I rebuild the app.
Ideally I'd like to automatically insert the date/time when the code (or the jar) was built into something I can access at runtime, but any workable approach would do.
Does anyone have any suggestions?
Thanks
James
Link to comment
https://www.neowin.net/forum/topic/746508-javaaccessing-build-datetime-at-runtime/Share on other sites
8 answers to this question
Recommended Posts