In JRE, Sun’s internal packages are prefixed with 2 top-level domains (sun and com). For example,
com.sun.security.jgss
sun.security.jgss
It seems pretty random to me which prefix they choose. I am curious what rules Sun uses for this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The “com.sun” convention is the more preferable format because it follows the “naming conventions” that have been established for naming Java packages.
http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
You’re supposed to use your unique company or personal website URL as the first few words in the package to guarantee uniqueness in the namespace. The ones that start with “sun” were probably not intended to be exposed to the outside world.