views:

76

answers:

2

From what I understand Java packages often use a company's website as a package namespace.

For example if stackoverflow had a Java widget library it might be called com.stackoverflow.widget.

But what happens if you use an obscure TLD. Is info.example.widget acceptable?

+6  A: 

Sure, no problem. Whatever your company's domain name and whatever its TLD is, reverse the order of its components for your Java packages.

BoltClock
+2  A: 

The intent of using a domain name is that it helps ensure uniqueness using something that pretty much any organization will already have. That means that no one really needs to be 'responsible' for doling out uniques IDs for package names (or that something ugly like the GUIDs used by COM don't need to be used).

So even if your domain name is obscure, by all means use it - it's still unique.

Michael Burr
And at the end of the day, the package is simply an opaque namespace piggy backing on DNS for allocation to avoid collisions. It doesn't help the situation where company B buys a domain from company A and both end up with code packaged using that single domain name.
Software Monkey