Packages
A reference to a JavaPackage object that represents the top node of the java.* package hierarchy.
A reference to a JavaPackage object that represents the top node of the netscape.* package hierarchy.
A reference to a JavaPackage object that represents the top node of the sun.* package hierarchy.
The Packages property is a "global" variable in JavaScript. It is a read-only reference to a JavaPackage object, and is defined as a property of all Window objects. Because the Packages property is the same for all Window objects, you can always refer to it simply as Packages, rather than explicitly accessing it through a particular Window object.
A JavaPackage object in JavaScript is an object that contains references to other JavaPackage objects and to JavaClass objects. Each JavaPackage object represents a node in the tree of package names. The Packages property refers to a JavaPackage object that is the root of this package name hierarchy.
The Packages JavaPackage object contains three properties--java, sun, and netscape--all of which refer to other JavaPackage objects representing the java.*, sun.*, and netscape.* Java packages.
The Window object also contains "global" properties named java, netscape, and sun, all of which are synonyms for the properties of the Packages object. So instead of writing Packages.java.lang.Math, for example, you can just write java.lang.Math.