views:

96

answers:

4

I tried googling this but can't find anything. I'm just curious as to why we use the folder name 'com' as the root directory? what does it stand for? computer? haha. thanks

+2  A: 

It's a domain name with the components in reverse order.

Andrew Medico
what do you mean its a domain name? im talking about in flash for example it seems standard to have the root directory folder name to be called com. so you would have like com.ui.whatever etc.
princyp
The OP is talking about package names, not domain names.
JSBangs
+1  A: 

Generally ".com" stands for a commercial solution. In this case I suppose that the package is part of a commercial API.

Dario
+3  A: 

Assuming you're talking about java packages, the package name is a reverse of the domain name of the package provider. So, packages from "sun.com" are named "com.sun.*". If there were a "sun.org" or 'sun.net", those packages would be named "org.sun.*" or "net.sun.*"

Bryan Oakley
+4  A: 

Standard practice when naming packages, in order to avoid collisions, is to name them after a domain that you own, in reverse order. So if your company's website was betterwidgets.com, you would almost certainly put your files in a com.betterwidgets.* package.

Java (and probably other languages) impose that the directory structure needs to conform to the package hierarchy (even though it's non-hierarchical, go figure) and so in this case, all the source files would be under "com" directory, then a "betterwidgets" subdirectory within that.

Andrzej Doyle