7.2.1
Storing Packages in a File System
PACKAGES
applet
awt
io
lang
net
util
corresponding to the standard packages
java.applet
,
java.awt
,
java.io
,
java.lang
,
java.net
, and
java.util
that are defined as part of the standard
Java Application Programming Interface.
Still continuing the example, if we were to look inside the directory
util
, we
might see the following files:
BitSet.java
Observable.java
BitSet.class
Observable.class
Date.java
Observer.java
Date.class
Observer.class
Dictionary.java
Properties.java
Dictionary.class
Properties.class
EmptyStackException.java
Random.java
EmptyStackException.class
Random.class
Enumeration.java
Stack.java
Enumeration.class
Stack.class
Hashtable.java
StringTokenizer.java
Hashtable.class
StringTokenizer.class
NoSuchElementException.java
Vector.java
NoSuchElementException.class
Vector.class
where each of the
.java
files contains the source for a compilation unit ( 7.3)
that contains the definition of a class or interface whose binary compiled form is
contained in the corresponding
.class
file.
Under this simple organization of packages, an implementation of Java would
transform a package name into a pathname by concatenating the components of
the package name, placing a file name separator (directory indicator) between
adjacent components. For example, if this simple organization were used on a
UNIX system, where the file name separator is
/
, the package name:
jag.scrabble.board
would be transformed into the directory name:
jag/scrabble/board
and:
COM.Sun.sunsoft.DOE
would be transformed to the directory name:
COM/Sun/sunsoft/DOE
116
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved