java - Eclipse 错误:Path must include project and resource name
PHPz
PHPz 2017-04-18 10:28:34
0
3
902

最近硬盘上同一位置的代码同时在windows和linux的eclipse里导入运行了。

从linux回到windows系统,发现eclipse报错了。

重新编译,update,clean都没法解决

StackOverflow上的答案是这样的:

This was caused by locally defined environment variable called $BROOT which was set in ~/.bashrc, and then picked up by the maven pom.xml. The environment variable put the output directory of the project outside the eclipse workspace, which is not how Eclipse likes to do things.

The solution was to unset the environment variable. This is the reason it works in Windows because Windows wouldn't know anything about ~/.bashrc.

但是不知道怎么unset the environment variable

PHPz
PHPz

学习是最好的投资!

全部回覆(3)
洪涛

最後發現原來是在Ubuntu下啟動eclipse時,用的是windows下的檔案路徑,在專案目錄產生了一個E:磁碟的路徑。而且在windows下無法刪除。回到Ubuntu下刪除,就好了

Ty80

刪除專案目錄下的
.settings/ 資料夾
.classpath 檔案
.project 檔案

然後重新將該maven專案匯入到eclipse中

PHPzhong

maven的話,保留寫好的檔案就好,IDE產生的就不要

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板