What's the convention for java package names without a domain association? What's the convention for java package names without a domain association? java java

What's the convention for java package names without a domain association?


If you are going to be distributing a lot of stuff, I would really suggest getting a domain name. Another alternative however would be to use your e-mail: e.g. bob@gmail.com would become com.gmail.bob. This is less common than using domain names but is still done by some and still ensures uniqueness.


One convention is to use the domain name of the hosting provider, e.g.

com.github.myrepositorynamenet.sf.sourceforge.myprojectcom.googlecode.myproject

Benefits:

Drawbacks:

  • if you decide to change providers, you either have package structures which are out-of-date, or you introduce backward-incompatible changes to keep the source in line with your new provider


Domain names can be had for free.For example dyn.com offers free domain names of the form 'whatever.dyndns.org' at http://free.domain.name/