What package naming convention do you use for personal/hobby projects in Java? What package naming convention do you use for personal/hobby projects in Java? java java

What package naming convention do you use for personal/hobby projects in Java?


If you're just doing personal projects where nobody else will use the code, then you can make up a package name that you like. Don't make up something that starts with com. or net. or other top-level domain though, because that would imply that you own the domain name (ie. using com.john as your package name just because your name happens to be John is not a good idea).

If you're going to give the code to anybody else, you should use a globally unique package name, which according to Java conventions means you should register and use a domain name.


I just use my initials: fg.nameofproject.etc

It reduces typing.It can be prefixed at any time with sf.net or com. or org. or com.google..

As the project is personal treat it special just like your freshly pressed personalized gift shirt - it will feel good.


<sarcasm> Bah. Any self-respecting programmer would have his or her own domain name. This is clearly a trick question. Everyone has their own personal domain name! </sarcasm> :-)

Ok, in all seriousness, buying a custom domain name is probably the easiest option. For about $10 a year, you can find reputable providers to host the domain and forward email.