Java包com和org [英] Java packages com and org

查看:393
本文介绍了Java包com和org的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

java中包org和com的含义是什么?

What are the meaning of the packages org and com in java?

推荐答案

根据 Sun ,软件包应该根据你的域名的反向命名,然后是你认为合适。大多数公司或组织都有 .com .org 域名,因此大多数软件包都以<$ c开头$ c> com。或 org。。引用 Sun Code Conventions

According to Sun, packages should be namespaced according to the inverse of your domain name, and then followed by whatever you see fit. Most companies or organisations have a .com, or .org domain name, and hence most packages start with com. or org.. To quote from the Sun Code Conventions:


唯一包名的前缀总是用全小写的ASCII字母书写,应该是顶级域名之一,目前是com,edu, gov,mil,net,org,或标识ISO标准3166,1981中规定的国家的英文双字母代码之一。

The prefix of a unique package name is always written in all-lowercase ASCII letters and should be one of the top-level domain names, currently com, edu, gov, mil, net, org, or one of the English two-letter codes identifying countries as specified in ISO Standard 3166, 1981.

包名的后续组件各不相同根据组织自己的内部命名惯例。这些约定可能指定某些目录名称组件是除法,部门,项目,机器或登录名。

Subsequent components of the package name vary according to an organization's own internal naming conventions. Such conventions might specify that certain directory name components be division, department, project, machine, or login names.

以及它们的示例给,明确表示你打算使用公司DNS名称:

And the examples that they give, make it pretty clear that you are meant to use the companies DNS name:


com.sun.eng

com.sun.eng

com.apple.quicktime.v2

com.apple.quicktime.v2

edu.cmu.cs.bovik.cheese

edu.cmu.cs.bovik.cheese

你还会看到 edu。 net。打包在野外,虽然它们不太常见。

You will also see edu. and net. packages out in the wild as well, although they are less common.

这篇关于Java包com和org的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆