Eclipse Juno改变了我的一个java包的大小写并导致了一个错误



得到一个我在eclipse Juno中从未见过的有趣结果。

问题:

Errors (1 item)
The project was not built due to "A resource exists with a different case: '/rev_4677/bin/com/utils/anttasks'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent.
Type: Java Problem

在我的项目中,资源(包)是'com.utils。但在构建路径下,它被改为WEB-INF/com/utils/anttasks。

web应用程序运行,但我只是不明白为什么Eclipse这样做。

哦,是的,我已经按照Eclipse的建议做了,刷新和重建(清理)了项目,仍然没有乐趣。

问题不在于eclipse,而在于您的包声明。你的包名应该只用小写。

从javadoc

包名全部小写,以避免与类或接口的名称。

相关内容

最新更新