简体   繁体   English

如何在eclipse或jar-file-explorer中查看jar文件的内容

[英]How to view the contents of jar file in eclipse or jar-file-explorer

I am working on a project where i need to know the contents of jar file included in my web-project. 我正在开发一个项目,我需要知道我的web项目中包含的jar文件的内容。 I am using Eclipse juno. 我正在使用Eclipse juno。 However Netbeans provides these features to view the contents of a jar-file. 但是,Netbeans提供了这些功能来查看jar文件的内容。 Please suggest me how to achieve this in eclipse. 请建议我如何在eclipse中实现这一点。

In the project explorer, you should have something with an icon looking like a pile of book like those: 在项目资源管理器中,你应该有一个图标看起来像一堆书的东西:

classpath容器

just expand the one containing your dependencies (probably labelled "Referenced Librairies") and you can browse as usual. 只需展开包含依赖项的那个(可能标记为“Referenced Librairies”),您就可以像往常一样浏览。

NB: you will probably need to specify where the sources are for each jars (right click on a jar > Properties > Java source attachment) 注意:您可能需要指定每个罐子的来源(右键单击jar>属性> Java源附件)

[image is courtesy of JBoss community] [图片由JBoss社区提供]

Please use the Eclipse plugin zipeditor in order to view the content of jars, zips or wars: Enter update site: http://zipeditor.sourceforge.org/update and enjoy. 请使用Eclipse插件zipeditor查看罐子,拉链或战争的内容:输入更新站点:http: //zipeditor.sourceforge.org/update并享受。 That is the best choice so far to handle archives in Eclipse. 到目前为止,这是处理Eclipse中存档的最佳选择。

需要将jar添加到库选项卡中的构建路径(如果尚未添加),以便可以在引用的库下查看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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