“订单和出口” “Java构建路径”中的选项卡 [英] The "Order and Export" tab in "Java Build Path"

查看:93
本文介绍了“订单和出口” “Java构建路径”中的选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



什么是在Java Build Path对话框中使用Order and Export选项卡?
通过名称'order',我可以猜测在插件依赖关系之前搜索了JRE System库,但是为什么我们在Build Path中有Export?而元素左侧的按钮是什么呢?



ADDED



这是我从

  • 配置Eclipse Java项目

  • Java构建路径


  • 解决方案

    这个标签似乎拉了双重责任(见这个帮助页面的底部少量的细节)。



    一方面,它用作建设有关项目(订单部分)中使用的资源的解决顺序。另一方面,它还用于定义这些构建路径的哪些部分是为依赖项目贡献的(在项目选项卡中列出此项目以查看此偏好面板)构建路径(导出部分)。



    后一个功能是为什么复选框存在于左侧,正如你所问(注意' - '标志不能被取消选中,因为这个定义的源文件项目不能取消选择,如帮助文件中所述)。如果贡献项目没有导出该资源,那么预计贡献项目的一些资源将不会被编译/运行的依赖项目。



    编辑:参见这个帖子,以供佐证。


    What's the use of "Order and Export" tab in "Java Build Path" dialog box? By the name 'order', I can guess that JRE System library is searched before Plug-in Dependencies, but why do we have 'Export' in Build Path ? And what's it for the button left side of the elements?

    ADDED

    It's the example that I borrowed from Eclipse distilled.

    The orderes.webapp depends on orders, but it's likely to use the classes defined in ubl and catalog.

    In such a case, orders can export catalog and ubl so that the packages that depends on it can use catalog and ubl.

    And something more about "Order and Export".

    1. The check of the left side button modifies the .classpath file to add exported=true such as <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.7.jar"/>.
    2. The src is always checked, and you can't uncheck it.

    References

    解决方案

    This tab seems to pull double duty (see bottom of this help page for small amount of detail).

    On one hand, it functions as the order of resolution for resources used in the building of the project in question (the "Order" part). On the other, it also serves to define what parts of this build path are contributed to dependent projects' (those listing this project in the "projects" tab for their view of this preference panel) build paths (the "Export" part).

    This latter function is why the checkboxes exist on the left hand side, as you ask (note that the '-' signs cannot be unchecked, as source files defined in this project cannot be deselected, as stated in help file). A dependent project that expects some resource from the contributing project will not compile/run if the contributing project doesn't export that resource.

    EDIT: see this SO post for corroboration.

    这篇关于“订单和出口” “Java构建路径”中的选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆