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:
- your package namespace will be unique, since the hosting provider won't have two projects of the same name
- it's only as expensive as the host's costs, many of which are free
- it can be an easy way to fulfil Sonatype's requirements if you want to get your project into Maven Central
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/