The problem with the JVM is that even for private classes the name is still public (and cannot be shadowed). Some form of name mangling (either the class or the package the class lives in) would be needed. Perhaps this is something that the compiler should do, so it would be worth filing a bug/feature request.