eclipse导入其他包出现错误

来源:互联网 发布:java中replace函数 编辑:程序博客网 时间:2024/06/06 15:36

eclipse导入其他包出现错误:

package这一行显示错误

 Multiple markers at this line
    - The type java.lang.Object cannot be resolved. It is indirectly referenced from
     required .class files
    - The type java.lang.String cannot be resolved. It is indirectly referenced from
     required .class files


以及io包和util包的错误

The import java.io cannot be resolved

The import java.util cannot be resolved






解决方法:

在package explorer中右键自己的project名,build path,config build path ; jre system library 上面会有一个小叉叉,显示这一项有错误。双击将alternate jre 选择为jdk就ok了!

0 0
原创粉丝点击