I have a .jar project which may be using Log4j. How can I check the version number of that Log4j?
It's an executable JAR file. I don't have the source code and can't decompile it.
Decompress the JAR file and look for the manifest file (META-INF\MANIFEST.MF)
unzip -p file.jar META-INF/MANIFEST.MF
There are two ways to do this
Way 1:
jar -tfv my.jar | grep -i log4
23590 Tue Aug 10 10:51:24 IST 2021 log4j-slf4j-impl-2.13.3.jar
32722 Tue Aug 10 10:51:24 IST 2021 log4j-web-2.13.3.jar
1714164 Tue Aug 10 10:51:24 IST 2021 log4j-core-2.13.3.jar
23702 Tue Aug 10 10:51:24 IST 2021 log4j-over-slf4j-1.7.30.jar
292301 Tue Aug 10 10:51:24 IST 2021 log4j-api-2.13.3.jar
11259 Tue Aug 10 10:50:10 IST 2021 log4j2.xml
Way 2:
unzip -l my.jar | grep -i log4
23590 08-10-2021 10:51 log4j-slf4j-impl-2.13.3.jar
32722 08-10-2021 10:51 log4j-web-2.13.3.jar
1714164 08-10-2021 10:51 log4j-core-2.13.3.jar
23702 08-10-2021 10:51 log4j-over-slf4j-1.7.30.jar
292301 08-10-2021 10:51 log4j-api-2.13.3.jar
11259 08-10-2021 10:50 log4j2.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With