It is indirectly referenced from required .class files(导入项目报错原因与解决方法)

这几天导入另一个开发的新项目时,报了个头疼的错误

The project was not built since its build path is incomplete.The type java.util.Arrays cannot be resolved. It is indirectly referenced from required .class files.

显然不是代码的问题,都木有找到util包下的内容,就很容易想到是jdk版本问题啦!

通常来说,你应该安装了几个版本的jdk。


做个解决方法的笔记:

1.进入windows\preferences\java\Installed JREs

  add--->Standard VM --->next--->接下来就是选择JRE home,选择另一个jdk安装目录

2.选中报错的项目,右键,properties\Java Build Path

 add library-->JRE System Library -->next -->workspace default JRE--->finish

刷新项目,已经OK啦!


你可能感兴趣的:(JAVA)