16

Possible Duplicate:
What is the point of Java’s package naming convention?
What package name to choose for a small, open-source Java project?

I write Java (and derivative languages with package names) for personal use, but I don't have a personal domain name, so the standard packaging naming convention doesn't hold. Since the same convention is used in Maven group-id's, the problem is the same there.

What should I use for the root of my package name?

C. Ross
  • 2,926
  • 2
  • 26
  • 42
  • Do you have a blog? You could "craft" a domain-like structure out of your blog URI. – sharptooth Dec 03 '12 at 14:59
  • see: [What package name to choose for a small, open-source Java project?](http://programmers.stackexchange.com/questions/173466/what-package-name-to-choose-for-a-small-open-source-java-project) – gnat Dec 03 '12 at 15:06
  • 4
    personal.c_ross? Or get a domain name? – Alex Feinman Dec 03 '12 at 15:08
  • @gnat - Yes, this is a duplicate of another question and should be closed, but why is that question closed? I just voted to reopen that one. Clearly this affects more than one person - everyone programming Java who doesn't own a domain is affected. – GlenPeterson Dec 03 '12 at 17:15
  • @GlenPeterson I believe both your and SOSJP questions are borderline between shopping and good, and that _good_ parts of them are sufficiently well covered by [What is the point of Java’s package naming convention?](http://programmers.stackexchange.com/questions/117030/what-is-the-point-of-javas-package-naming-convention) – gnat Dec 03 '12 at 21:09
  • Coupla spitball ideas: 1. `arpa.ip6.link-local-address-corresponding-to-the-MAC-address-of-the-first-computer-you-ever-owned`; 2. Use one of [OpenNIC's domains](https://wiki.opennic.org/opennic/dot); 3. Subdomain of your name on a [more officially guaranteed-unregistrable domain](https://tools.ietf.org/html/rfc2606#section-2) – JamesTheAwesomeDude Apr 05 '18 at 16:04

3 Answers3

8
com.ross
org.ross
personal.ross

Really, who cares? It's probably not important if you don't know what to choose. Or you wouldn't ask.

Florian Margaine
  • 6,791
  • 3
  • 33
  • 46
  • 1
    To add: the domain is largely arbitrary and, in my experience, used more to ensure a unique application name (kind of like when websites use your email address as the username - it's guaranteed to be unique, because another authority has ensured it to be so). I wouldn't go with a "com." domain unless you own that ".com", though, just to avoid potential confusion with the owner of that HTTP domain. Personally, I like Alex Feinman's suggestion of "personal.[name/username]". – Shauna Dec 03 '12 at 15:32
2

One idea would be to use your name, like org.cross.

sourcenouveau
  • 6,460
  • 4
  • 29
  • 44
1

Imagine you'd get a domain. I'd bet neither org.cross nor com.ross from the other answers are free, but something more complicated is. Go to a web domain registrator page and query what's free (you don't need to buy or reserve the domain). This is how I'm doing it since years; I still need no domain, but the one I chose is still free.

maaartinus
  • 2,633
  • 1
  • 21
  • 29
  • 8
    ...But what would you do if the one you chose gets bought tomorrow? – FrustratedWithFormsDesigner Dec 03 '12 at 15:28
  • @FrustratedWithFormsDesigner: The life is full of risks and I took this one. For some time I'd do nothing and when needed I'd switch everything to a new domain. That's surely no easy task and would cost me quite some time, but the only alternative is to buy the domain immediately. It's not expensive, but the probability of somebody buying "my" domain is very low. – maaartinus Dec 03 '12 at 16:07