;

PDA

Click to See Complete Forum and Search --> : ^[0-9] package name?


BodBod
11-24-2007, 01:44 PM
Hello, I wasn't able to formulate a good keyword search for this question , so apologies if it's come up a million times before.

Given a&&b where:

a) package names should adopt a "reverse domain" standard e.g.
com.flashkit.utils
b) packages, classes in fact anything can't begin with a number.

What is the standard way to name a package originating from a domain with the lack of foresight to avoid beginning with a number. e.g.

com.4sightlacking.utils

Many thanks.

BodBod
11-27-2007, 04:26 PM
I was thinking _underscores. e.g.

com.4sightlacking.utils
becomes
com._4sightlacking.utils

Did a bit of digging and this seems to be inline with Sun's approach:

http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html - see 7.7 at the very bottom.

I couldn't find much else to support this though so would still appreciate a second opinion. Thanks.