修复 eclipse 项目设置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8894971/
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-19 17:34:50  来源:igfitidea点击:

Fix eclipse project setup

eclipse

提问by Vaandu

import java.util.*;is not recognized by eclipse, shows red alert. All java API's are not recognized.

import java.util.*;eclipse 无法识别,显示红色警报。无法识别所有 Java API。

Here is what happened. java 7 got installed to my system automatically. From that incident, it is behaving like this. I have uninstalled Java 7. I don't use eclipse to build or run.

这是发生的事情。java 7 已自动安装到我的系统中。从那次事件来看,它的行为是这样的。我已经卸载了 Java 7。我不使用 eclipse 来构建或运行。

Please help.

请帮忙。

Thanks in advance.

提前致谢。

EDIT: this is the project setup.

编辑:这是项目设置。

enter image description here

在此处输入图片说明

回答by Adel Boutros

Check your classpathin eclipseand make sure it has a reference to jrelibrary. If not, add it.

检查您的classpathin eclipse并确保它具有对jre库的引用。如果没有,请添加它。

UPDATE:

更新:

Right-click on an error. Click on Quick Fixand search for the suggestion of importing a project or library.

右键单击错误。单击Quick Fix并搜索导入项目或库的建议。