A package is a named collection of related source parts.
By convention, you achieve uniqueness in package names by making the initial part of the package name an inversion of your organization's Internet domain name. For example, the IBM(R) domain name is ibm.com(R), and the EGL packages begin with "com.ibm". By using this convention, you gain some assurance that the names of Web programs developed by your organization will not duplicate the names of programs developed by another organization and can be installed on the same server without possibility of a name collision.
The folders of a given package are identified by the package name, which is a sequence of identifiers separated by periods (.), as in this example:
com.mycom.mypack
Each identifier corresponds to a subfolder under an EGL source folder. The directory structure for com.mycom.mypack, for example, is \com\mycom\mypack, and the source files are stored in the bottom-most folder; in this case, in mypack. If the workspace is c:\myWorkspace, if the project is new.project, and if the source folder is EGLSource, the path for that package is as follows:
c:\myWorkspace\new.project\EGLSource\com\mycom\mypack
The parts in an EGL file all belong to the same package. The file's package statement, if any, specifies the name of that package. If you do not specify a package statement, the parts are stored directly in the source folder and are said to be in the default package. It is recommended that you always specify a package statement because files in the default package cannot be shared by parts in other packages or projects.
Two parts with the same identifier may not be defined in the same package. It is strongly recommended that you avoid using the same package name under different projects or different folders.
The package for generated Java output is the same as the EGL file package in most cases.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.