MyEclipse报错:String cannot be resolved to a type

往MyEclipse导入项目后,java 类总是报出n 多红叉,实在是惨不忍睹,String cannot be resolved to a type 都出来了,

开始以为是Myeclipse的事,但重启后发现问题还存在,于是在网上搜,结果说是JDK的问题

解决方法:

右键项目: properties–java build path- Libraries

找到JRE System Library, 发现 JRE System Library 1.7 后面是unbond ,

点击edit ,alternate jre 选择JDK的安装路径. 这样, 问题就解决
MyEclipse报错:String cannot be resolved to a type