It is a requirement in Java that the components of a package name and its filesystem path relative to the source root be identical. Not only identical as far as names go, but identical as far as the capitalization of the names of the path components.
So, simply speaking, you cannot put a "com.coderanch.hierarchy" in a "com/hierarchy". It isn't an Eclipse limitation, it's a Java restriction.
An IDE is no substitute for an Intelligent Developer.
Could you please provide some link to that limitation? I can't find such in JLS for example.
I can provide link to blog of one experienced Java developer that has an article that denies what you said. But that blog is in Russian so I think it wouldn't be useful for you.
Moreover I have a project with such class hierarchy and it compiles fine with Ant. So I think there is should be such possibility in Eclipse too.
I'm not totally incompetent at Russian, but I'll admit that it would be a bit much to reliably read a technical article in it.
Still, remember that not everything on the Internet is true. And some things that were once true are true no longer.
I'd like to see the Ant task that you're compiling with. I do know a few ways to hack the standard rules and I'd like to see which one you're using. Although, come to think of it, I'm not sure a bad package path directive will actually cause a compiler error. Though the resulting class file wouldn't be in the place you'd probably expect.
Still, just because you can break the standard, that doesn't mean that you should. While Eclipse can be persuaded to set aside some of its constraints, those constraints are there because it's bad practice not to obey them, and one of the primary purposes of an IDE is to assist in good practices.
Yes, I agree that Eclipse can help to avoid bad practices. But for now I have dynamically developed project that was ported from .NET to Java. So some things are go wrong with Java best practices. So I need to manage that staff even if I don't really like that.
As for Ant task... We had NetBeans project and it creates very complex build.xml file with a lot of mess dependencies. Moreover that file was somehow edited by developers for pursuit some build goals. That file has near 1600 lines and completely unreadable. Moreover I don't know (and maybe don't want ) to know how does that staff is working. All I need is to watch on our Continuous Integration that all things go well.
So that is not important what hack is used here. I would like to know how to make that hack with Eclipse.