在Java SNMP4J中,如何查找snmp4j.jar和SNMP4J-agent.jar的版本?

发布于 2024-11-26 17:19:56 字数 54 浏览 5 评论 0原文

如何从 snmp4j.jar 和 SNMP4J-agent.jar 文件中找到 jar 版本。

How can I find out the jar version from the snmp4j.jar and SNMP4J-agent.jar files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜味超标? 2024-12-03 17:19:56

如果 META-INF\maven\org.snmp4j\snmp4j\pom.properties 文件存在,请检查您正在使用的 JAR 文件的版本。

如果是,您可以从 JAR 中读取此文件并加载版本属性。

Check in the version of the JAR files you are using if the META-INF\maven\org.snmp4j\snmp4j\pom.properties file exists.

If it does you can read this file from the JAR and load the version property.

恬淡成诗 2024-12-03 17:19:56

您可以解压缩 .jar。 .jar 只是 .zip 存档的另一种格式,带有附加信息。

使用 7-zip 或其他 ZIP 实用程序将其打开。这应该允许您检查罐子中的内容。如果 pom.properties 不存在,那么就四处看看。您也许可以找到包含版本信息的其他文件。在以下目录 org\snmp4j\version 中应该有一个 VersionInfo 类。如果您想使用您最喜欢的 java 反编译器来弄清楚,那将是一个很好的起点。

You can unzip the .jar. A .jar is just a another format of a .zip archive with additional info.

Open it up in 7-zip or some other ZIP utility. This should allow you to inspect the contents of the jar. If the pom.properties doesn't exist in there, then poke around. You may be able to find some other file which contains the version info. There should be a VersionInfo class in the following directory org\snmp4j\version. That would be a good place to start, if you wanted to figure out, using your favourite java decompiler.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文