찾다

 >  Q&A  >  본문

java - Eclipse 错误:Path must include project and resource name

最近硬盘上同一位置的代码同时在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

PHPzPHPz2888일 전909

모든 응답(3)나는 대답할 것이다

  • PHP中文网

    PHP中文网2017-04-18 10:30:34

    드디어 Ubuntu에서 Eclipse를 시작할 때 Windows 아래의 파일 경로를 사용하고, 프로젝트 디렉터리에 E: 드라이브에 대한 경로가 생성된다는 사실을 알게 되었습니다. 그리고 Windows에서는 삭제할 수 없습니다. 우분투로 돌아가서 삭제하면 괜찮습니다

    회신하다
    0
  • PHP中文网

    PHP中文网2017-04-18 10:30:34

    프로젝트 디렉토리에서
    .settings/ 폴더
    .classpath 파일
    .project 파일

    을 삭제합니다.

    그런 다음 Maven 프로젝트를 Eclipse로 다시 가져옵니다

    회신하다
    0
  • PHPz

    PHPz2017-04-18 10:30:34

    Maven의 경우 작성한 파일만 보관하고 IDE에서 생성한 파일은 보관하지 마세요

    회신하다
    0
  • 취소회신하다