Is there any way to add some information to jar during compilation. And see that information during execution to know which jar is executing.
My scenario is that I am building a jar with fixed jar name and sending it to run on another machine. However it sometimes happen that it seem to run the old version of jar. Is there any way to identify it without needing to change jar file name and providing information during compilation. I cannot change java code everytime but can do one time change if required.