简体   繁体   中英

How to find out 3rd party libraries version?

In my project I want to find what is the version of 3rd party libraries. I only have the jar file and some of them contains manifest file with version number in but others don't. Is there a way other than manifest?

The general technique is to find a place which has multiple versions of the jars, and compare the jars with your version, using file size and checksums.

So, go to Maven Search (a good place to start) and search for your library. Then look through the versions that you find there and compare the file sizes with the one you have. Finally, compare the checksums with your jar, or just using a binary compare. If it's not on maven, then searching on the web is a last resort.

This is quite tedious to do, but most of the time it works. But, it isn't always possible to find out the version for a given jar, because it may not exist any more.

不能。您必须查看.class文件的编译日期,并手动将其关联以根据他们发布的日期发布日期。

The only semi-standard mechanism would be including version information in MANIFEST.MF, as you note. And, of course, many project JARs have a version in the file name. There is otherwise no other general way to define or determine the "version" of a library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM