Eclipse 项目不是在 Mac OS X 上构建的:“资源存在不同的情况”错误
我有一些代码,我继承了之前在 Linux 系统上构建的代码。我尝试在 Mac OS X Snow Leopard 上构建它。我的分区是 Mac OS 扩展(日志式)。我知道这是一个不区分大小写的文件系统,错误来自两个具有相同名称但大小写不同的 java 类。所以这个错误是“正常的”。
我试图找到解决方法,因此我使用文件系统分区 Mac OS X Extended(日志式,区分大小写)构建了一个磁盘映像。在该卷上,我可以创建两个名称相同但大小写不同的文件。
我在上面复制了我的项目,但错误仍然存在。然后,我在该卷上创建了一个新工作区,并将项目导入到该工作区中,但错误仍然存在。我认为该设置将存储在工作空间级别。
Eclipse 在哪里存储“区分大小写”/“不区分大小写”标志,或者为什么尽管工作区和项目位于区分大小写的卷上,Eclipse 仍然生成此错误。有没有办法可以在 Mac OS X 上区分大小写的分区上工作?
我知道我可以重命名这些类,但代码有点奇怪,在这种情况下它不是简单的重构。
谢谢
I have some code, I inherited that was previously build on a Linux system. I tried to build it on Mac OS X Snow Leopard. My partition is Mac OS Extended (journaled). I know this is a case insensitive file system and the errors comes from 2 java classes that have the same name but different case. So that error is "normal".
I tried to find a way around it, so I have build a Disk Image with the file system partition Mac OS X Extended (Journaled, Case-sensitive). On that volume I can create two files with the same name and different in case.
I copied my project on it, but the error remained. I then created a new workspace on that volume and imported the project in that workspace, but the error still remains. I would think that the setting for that would be stored on Workspace level.
Where does Eclipse store the "case-sensitive" / "case-insensitive" flag or why does Eclipse still generates this error although the workspace and project are on a case-sensitive volume. Is there a way this could work on Mac OS X on a case-sensitive partition?
I know I could just rename the classes, but the code is a bit funky and it is not a simple refactoring in this case.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我强烈建议您重命名其中一个文件,以便它可以存在于不区分大小写的文件系统上。虽然您今天可能没有任何计划,但您可能需要在某个时候在 Windows 上构建您的产品。
I strongly recommend you rename one of the files such that it can exist on a case-insensitive file system. While you might not have any plans today, you might need to build your product on Windows at some point.