Java print time of last compilation -


i'm looking embed piece of code print out time when current class last compiled. how can implemented in java?

there no direct support in java, since there no preprocessor. closest equivalent "build-date" attribute in jar manifest. many build systems add attribute default, or provide means add it.

you can read manifest of jar @ runtime date. answer so question describes how read values jar manifest.

the alternative use resource filtering add date properties file, read @ runtime. quite ad-hoc, non-standard , if have many jars, different compilation times, becomes difficult manage, unless can factor common part of how jars built.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -