Novikov
Novikov

Reputation: 4489

Java package naming and non .com domains

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?

Upvotes: 1

Views: 565

Answers (2)

Michael Burr
Michael Burr

Reputation: 340316

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.

Upvotes: 2

BoltClock
BoltClock

Reputation: 724202

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

Upvotes: 6

Related Questions