Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在eclipse中导入代码时遇到的Java问题_Java_Eclipse_Selenium Webdriver - Fatal编程技术网

在eclipse中导入代码时遇到的Java问题

在eclipse中导入代码时遇到的Java问题,java,eclipse,selenium-webdriver,Java,Eclipse,Selenium Webdriver,我在eclipse中导入java项目,并得到以下错误。在描述中,它给出了“Java问题(2项)”。第一项内容如下: The project was not built since its build path is incomplete. Cannot find the class file for java.lang.CharSequence. Fix the build path then try building this project. The type java.lang.Char

我在eclipse中导入java项目,并得到以下错误。在描述中,它给出了“Java问题(2项)”。第一项内容如下:

The project was not built since its build path is incomplete. Cannot find the class file for java.lang.CharSequence. Fix the build path then try building this project.
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from the required .class files.
第二项内容如下:

The project was not built since its build path is incomplete. Cannot find the class file for java.lang.CharSequence. Fix the build path then try building this project.
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from the required .class files.

只需在Eclipse中选择Project选项并单击Clean.com,然后构建项目

我就可以通过在项目中导入rt.jar文件来解决问题。感谢所有的帮助。

尝试重新启动Eclipsepossible duplicate of您是否确定使用外部JDK作为构建路径。现在在刷新项目之后清理项目。我尝试了清理、刷新和重新启动,但都没有成功。我发现JRE库中的访问规则有所不同。这可能是问题所在吗?我在当前项目中定义了164条规则,导入时一条也没有。此外,我在一个系统中定义了JRE-7,在另一个系统中定义了JRE-8,这可能是问题所在。