解释eclipse .classpath文件。什么是“kind =”con“和“exports =”true“意思? [英] Interpreting eclipse .classpath file. What does 'kind="con"' and 'exported="true"' mean?
问题描述
这是我下载的eclipse插件程序的eclipse .classpath
文件。
我认为 kind =src
和 kind =output code>是非常简单的,因为它们意味着源java文件和编译的类文件所在的位置。
kind =lib
似乎表示插件引用的jar文件,但是我有一些我不知道。
-
kind =con
是什么意思? -
exports =true
是什么?我想为了使用这个插件,插件所引用的所有jar文件都应该被导出,但只有一些引导出来。
1)在 kind =con
中, con
代表容器,被eclipse解释为一个 classpath容器。如该链接中所述:
类路径容器提供了一种通过类路径条目间接引用一组
类路径条目的方法换句话说,它能够以任何方式对其他类路径条目进行分组,并在任何地方重新使用它(包括能力)对于不同的项目有不同的条目)。
2)
导出
:
说你有ProjectB
这取决于项目C
。依赖关系定义为exported = true
。那么根据ProjectB
的另一个项目A
也将有ProjectC
存在于
A
'classpath。This is the eclipse
.classpath
file of the eclipse plugin program that I downloaded.I think that
kind="src"
andkind="output"
is pretty straight forward, as they means the where the source java files and compiled class files are located.The
kind="lib"
seems to indicate the jar files the plugin is referencing, but I have something that I'm not sure about.
- What does the
kind="con"
mean?- What is it for the
exported="true"
? I think in order to use this plugin, all the jar files that the plugin refers to should be exported, but only some of them are exported.解决方案1) In
kind="con"
, thecon
stands for container, which is interpreted by eclipse as a classpath container. As described in that link:A classpath container provides a way to indirectly reference a set of classpath entries through a classpath entry of kind CPE_CONTAINER
In other words, it enables grouping of other classpath entries in any way and re-use it wherever (including the ability of having different entries for different projects).
2)
exported
: Say you have ProjectB
that depends on ProjectC
. The dependency is defined asexported=true
. Then, another ProjectA
that depends on ProjectB
, will have also ProjectC
present onA
'a classpath.这篇关于解释eclipse .classpath文件。什么是“kind =”con“和“exports =”true“意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!