我如何知道我拥有的 servlet-api.jar 版本是什么?
我从 java2s.com 下载了 servlet-api.jar 的副本。我怎么知道它是什么版本?网站上没有任何参考。
编辑
啊。抱歉。当我双击我得到的 jar 中的 MANIFEST.MF 文件时,我应该列出写字板输出的内容:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
如您所见,它没有告诉我版本,因此出现了问题。
I downloaded a copy of servlet-api.jar from java2s.com. How do I know what version it is? There's no reference on the site.
EDIT
Ah. Apologies. I should have listed the content of the wordpad output when I double clicked on the MANIFEST.MF file in the jar I got:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
As you can see it didnt tell me the version hence the question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使用下面的代码片段:
use the below code snippet :
你可以从 META-INF 获取它,你可以使用 win rar 或类似的归档工具来探索 jar 文件的内容。
我个人更喜欢从 maven repo 下载 jar。
you can get it from META-INF, you can explore the content of jar file using win rar or such archiving utils something like.
I personally prefer maven repo to download jar from.
您可以使用 tomcat 附带的版本 2.4 的清单从 jar 文件的 META-INF 目录中提取 MANIFEST.MF,
如下所示
you can extract the MANIFEST.MF from the META-INF directory of your jar file by using
the manifest for version 2.4 that comes with tomcat looks like this for example
它基本上位于
/META-INF/MANIFEST.MF
下 JAR 的 MANIFEST 文件内:It's basically inside your JAR's MANIFEST file under
/META-INF/MANIFEST.MF
:对于关注者来说,如果它在 jnlp 发行版中,可能会有一个附带的“version.xml”文件,告诉您每个 jar 分别是什么版本。
for followers, if it's in a jnlp distro, there may be an accompanying "version.xml" file that tells you what versions each jar is respectively.