According to RFC 1912,
Allowable characters in a label for a host name are only ASCII
letters, digits, and the `-' character. Labels may not be all
numbers, but may have a leading digit (e.g., 3com.com). Labels must
end and begin only with a letter or digit. See [RFC 1035] and [RFC
1123]. (Labels were initially restricted in [RFC 1035] to start with
a letter, and some older hosts still reportedly have problems with
the relaxation in [RFC 1123].) Note there are some Internet
hostnames which violate this rule (411.org, 1776.com). The presence
of underscores in a label is allowed in [RFC 1033], except [RFC 1033]
is informational only and was not defining a standard. There is at
least one popular TCP/IP implementation which currently refuses to
talk to hosts named with underscores in them. It must be noted that
the language in [1035] is such that these rules are voluntary -- they
are there for those who wish to minimize problems. Note that the
rules for Internet host names also apply to hosts and addresses used
in SMTP (See RFC 821).
So the allowing digits at the front of domain names didn't begin until RFC 1123, in 1989.
It's worth noting that they started writing Java in 1990. Domains beginning with numbers probably weren't common by then, so package names seemed analogous to hostnames.
Package names don't have to directly correspond to domain names. To me, domain names are temporary - they can be bought and sold. Package names might last much longer than domain names.
For what it's worth, 3com solved it by buying another domain. ;-) They used com.palm.webos
for some software.