简体   繁体   English

从Eclipse中的项目资源管理器视图中删除项目.jars

[英]Remove project .jars from project explorer view in Eclipse

The list of jars just takes up too much space. 罐子清单只占用太多空间。 Can I collapse it or hide it? 我可以将其折叠或隐藏吗?

另一种解决方案是使用Package Explorer视图。

In the Project Explorer : 在Project Explorer中:

  • Customize View 自定义视图
  • Check Libraries from external Libraries from external检查Libraries from external

在此输入图像描述 在此输入图像描述

Or in the Package Explorer : 或者在Package Explorer中:

  • Uncheck the 'Show Referenced Libraries Node' 取消选中“显示引用的库节点”
  • Add a filter to hide "*.jar" files 添加过滤器以隐藏“* .jar”文件

在Eclipse3.5中,在“自定义视图”中选择过滤器“来自外部的库”。

In Eclipse 3.7 在Eclipse 3.7中

  • open view menu (arrow down icon in right section of title) of Project Explorer Project Explorer的打开视图菜单(标题右侧的箭头向下图标)
  • select Customize View menu item 选择“自定义视图”菜单项
  • in Available Customization window on Filters tab check Library from external and click OK 在“筛选器”选项卡上的“可用自定义”窗口中,从外部检查库,然后单

In Eclipse3.5 在Eclipse3.5中

  • Go to Configure Build Path. 转到配置构建路径。 Select the Library Tab 选择“库”选项卡
  • Remove any library jar files you want to hide 删除要隐藏的所有库jar文件
  • Use Add External Jar option to add the Jar file back 使用Add External Jar选项添加Jar文件
  • select the filter "libraries from external" in "customize view". 在“自定义视图”中选择过滤器“来自外部的库”。

Works for eclipse 3 and 4 in the project explorer and package explorer views. 适用于项目资源管理器和包浏览器视图中的eclipse 3和4。

Hey here is how it works: 嘿,这是它的工作原理:

  • Drop down on the ceiling -> Customize View... -> Filters tick "Libraries from external" 下拉天花板 - >自定义视图... - >过滤器勾选“来自外部的库”
  • Right click on the project -> Properties -> Java Build Path -> Remove all jars -> Add EXTERNAL jars -> add all jars 右键单击项目 - >属性 - > Java构建路径 - >删除所有罐子 - >添加EXTERNAL罐子 - >添加所有罐子

There you go. 你去吧

项目浏览器> [向下箭头图标]>自定义视图>选择要在资源管理器中查看的选项

Go the library Tab of Java Build Path, Add Variable (add a variable name and library folder location). 转到Java Build Path的库选项卡,添加变量(添加变量名和库文件夹位置)。

Once the variable is added, click on extend, you will see all the jars. 添加变量后,单击extend,您将看到所有的jar。 Select all of them (or whatever is needed) and click ok. 选择所有这些(或任何需要的),然后单击“确定”。 Exit the build path dialog box by clicking ok. 单击“确定”退出构建路径对话框。

This will remove all the jars from your project view. 这将从项目视图中删除所有jar。

In Eclipse Luna: 在Eclipse Luna中:

  1. On the toolbar for the Project Explorer, click the Menu button 'view menu' (arrow) to open the drop-down menu of display options. 在Project Explorer的工具栏上,单击菜单按钮“查看菜单” (箭头)以打开显示选项的下拉菜单。
  2. Select Customize View... 选择自定义视图...
  3. In the dialog box that opens, select the Filters tab and then select the checkboxes for the types of files that you want to hide. 在打开的对话框中,选择“过滤器”选项卡,然后选中要隐藏的文件类型的复选框。

For hiding *.jar select Libraries from external . 要隐藏* .jar,请 从外部选择
For more info check: Eclipse help 有关更多信息,请查看: Eclipse帮助

I believe that Eclipse 3.4.2 places jars under "Referenced Libraries" node which is collpasable. 我相信Eclipse 3.4.2将jar放在可引用的“Referenced Libraries”节点下。 What version do you use? 你用的是什么版本?

On Juno, see the "View menu" button on the left of the Project Explorer minimize button. 在Juno上,请参阅Project Explorer最小化按钮左侧的“视图菜单”按钮。 Develop the menu and select the "Customize view" option. 开发菜单并选择“自定义视图”选项。 In the Filter tab, check the "Libraries from external" option. 在“过滤器”选项卡中,选中“从外部库”选项。 That's all. 就这样。

For Eclipse STS, 对于Eclipse STS,

A quick work around to stop looking at your large list of jar files is to switch to Navigator view instead. 快速解决查看大型jar文件列表的方法是切换到Navigator视图。 For my purposes navigator works the same as project explorer. 出于我的目的,导航器与项目浏览器的工作方式相同。 I tried adding a custom filter "*.jar" in project view however custom filters is unavailable in STS. 我尝试在项目视图中添加自定义过滤器“* .jar”,但自定义过滤器在STS中不可用。 Also Customize View... -> Filters tick "Libraries from external" is only for 3rd party jars, it doesn't work for custom jars in your project. 另外自定义视图... - >过滤器勾选“来自外部的库”仅适用于第三方罐,它不适用于项目中的自定义jar。

或者您可以使用Maven2IVY等依赖管理工具以及项目之外的抽象依赖项。

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

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