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

查看:1281
本文介绍了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

解决方案

最后发现原来是在Ubuntu下启动eclipse时,用的是windows下的文件路径,在项目目录生成了一个E:盘的路径。而且在windows下无法删除。回到Ubuntu下删除,就好了

这篇关于java - Eclipse 错误:Path must include project and resource name的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆