Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)

一、Eclipse导入别人的web项目步骤:

.File>>Import>>General>>Existing Projects into Workspace

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第1张图片

点击Next,

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第2张图片

 然后在Browse选择要导入的项目文

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第3张图片

 选择好之后点击Finish就完成了!

 

二、导入web项目时出现的问题

1.在选择项目路径时会出现 Some projects cannot be imported because they already exist in the workspace

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第4张图片

 出现这个问题的原因是eclipse下有与该项目重名的项目,在导入之前要修改要导入的项目名。

 修改文件夹名是一方面,最重要的是修改.project配置文件,否则也不会成功!

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第5张图片

 

 Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第6张图片

 

 把名字更改为未使用过的。

 

2.出现JRE System Library(unbound)和Server Library(unbound)

可能项目导入成功后发现很多报错,基本的类都不能使用,此时需要修改项目的Java Build Path相关环境

右击要修改的项目,然后点击最下面的Properties,接着选择Java Build Path

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第7张图片

 

 修改后面有(unbound)的然后点击edit(我这里已经更改过了,没有unbound),选择相应的版本

 

Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace)_第8张图片

 

 此时项目可以运行了,但项目还有个红叉就不知道什么原因了.....新手求解.....

 

博客参考:

https://www.cnblogs.com/mkl34367803/p/8572667.html

http://www.pc6.com/infoview/Article_114540.html

 

你可能感兴趣的:(Eclipse下导入web项目(Some projects cannot be imported because they already exist in the workspace))