Java Packages – Java-Style Package Naming and Second-Level Country Domains

namingpackages

I own a .co.uk domain, and I whenever I've dealt with Java-style package naming, I've gone with uk.co.domainname. Once I encountered package that did the following: co.uk.domainname.

Is one of these right, or is it something that's up to the developer's discretion? Is there some sort of convention that deals with this?

Best Answer

There's no real rule here, just the conventions that Sun created with the com.sun.* packagers. The only real requirement is uniqueness and that the co.uk... convention defines a folder/file structure.

What will be the decider in your case is what name you want for a 'root' folder - 'uk' or 'co'?