how to check the version of jar file?
Decompress the JAR file and look for the manifest file (META-INF\MANIFEST.MF
). The manifest file of JAR file might contain a version number (but not always a version is specified).
Just to expand on the answers above, inside the META-INF/MANIFEST.MF file in the JAR, you will likely see a line: Manifest-Version: 1.0
← This is NOT the jar versions number!
You need to look for Implementation-Version
which, if present, is a free-text string so entirely up to the JAR's author as to what you'll find in there.
See also Oracle docs and Package Version specificaion
You need to unzip it and check its META-INF/MANIFEST.MF
file, e.g.
unzip -p file.jar | head
or more specific:
unzip -p file.jar META-INF/MANIFEST.MF
Just to complete the above answer.
Manifest file is located inside jar at META-INF\MANIFEST.MF
path.
You can examine jar's contents in any archiver that supports zip.