修复 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
Fix eclipse project setup
提问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.
编辑:这是项目设置。
回答by Adel Boutros
Check your classpath
in eclipseand make sure it has a reference to jre
library. If not, add it.
检查您的classpath
in eclipse并确保它具有对jre
库的引用。如果没有,请添加它。
UPDATE:
更新:
Right-click on an error. Click on Quick Fix
and search for the suggestion of importing a project or library.
右键单击错误。单击Quick Fix
并搜索导入项目或库的建议。