如何在 Eclipse 中修改类路径?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11217870/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:08:14  来源:igfitidea点击:

How to modify classpath in Eclipse?

eclipseclasspath

提问by Java Impatient

Again, I saw this sentence:

再一次,我看到了这句话:

A .classpath file snippet that can be included in your project's .classpath has been provided here(ie, a link). Please only use the classpathentry's you actually need (see below for details).

此处提供了可以包含在项目的 .classpath 中的 .classpath 文件片段(即链接)。请仅使用您实际需要的类路径(有关详细信息,请参见下文)。

What do these sentences mean and how can I add that code snippet to my classpath file in eclipse ?

这些句子是什么意思,我如何在 eclipse 中将该代码片段添加到我的类路径文件中?

Please help.

请帮忙。

回答by cklab

I understand this as you want to find the classpath file. Go to eclipse and press CTRL+SHIFT+R. Type .classpathand select the file in your project.

我理解这一点,因为您想找到类路径文件。转到 eclipse 并按CTRL+ SHIFT+ R。键入.classpath并选择项目中的文件。

Note: If you're modifying this file and you don't know what it is, I advise you be extra careful :).

注意:如果你正在修改这个文件并且你不知道它是什么,我建议你要格外小心:)。

回答by Federico Cristina

Although you can modify the .classpath file, Eclipse manages this file for you automatically every time you change the Java Build Path properties of your project. This is a better approach than manually changing the file.

尽管您可以修改 .classpath 文件,但是每次您更改项目的 Java Build Path 属性时,Eclipse 都会自动为您管理此文件。这是比手动更改文件更好的方法。