在Java SNMP4J中,如何查找snmp4j.jar和SNMP4J-agent.jar的版本?
如何从 snmp4j.jar 和 SNMP4J-agent.jar 文件中找到 jar 版本。
How can I find out the jar version from the snmp4j.jar and SNMP4J-agent.jar files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果
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.
您可以解压缩 .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.