Packages This Package Prev Next Index
The popularization of the World Wide Web helped catapult these attributes of Java into the limelight. The Internet demonstrated how interesting, media-rich content could be made accessible in simple ways. Web browsers like Mosaic enabled millions of people to roam the Net and made Web surfing part of popular culture. At last there was a medium where what you saw and heard was essentially the same whether you were on a Mac, PC or UNIX machine, connected to a high-speed network or a modem.
But with popularity comes scrutiny and soon Web enthusiasts felt that the content supported by the Web's HTML document format was too limited. HTML extensions like forms only highlighted those limitations while making it clear that no browser could include all the features users wanted. Extensibility was the answer. At just this time the Java programming language found itself looking for another application.
Sun's HotJava browser was developed to showcase Java's interesting properties by making it possible to embed Java programs inside Web pages. These Java programs, known as applets, are transparently downloaded into the HotJava browser along with the HTML pages in which they appear. Before being accepted by the browser, applets are carefully checked to make sure they are safe. Like HTML pages, compiled Java programs are network- and platform-independent. Applets behave the same regardless of where they come from or what kind of machine they are being loaded into.
The Web community quickly noticed that Java was something new and important. With Java as the extension language, a Web browser could have limitless capabilities. Programmers could write an applet once and it would then run on any machine, anywhere. Visitors to Java-powered Web pages could use the content found there with confidence that nothing would damage their machine.
With applets as the initial focus, Java has demonstrated a new way to make use of the Internet to distribute software. This new paradigm goes beyond browsers. We believe it is an innovation with the potential to change the course of computing.
Senior Staff Engineer
The Java series provides definitive reference documentation for Java programmers and end users. They are written by members of the Java team and published under the auspices of JavaSoft, a Sun Microsystems business. The World-Wide-Web allows Java documentation to be made available over the Internet, either by downloading or as hypertext. Nevertheless, the world-wide interest in Java led us to write these books.
To learn the latest about Java or download the latest Java release, visit our World Wide Web site at http://java.sun.com. For updated information about the Java Series, including sample code, errata, and previews of forthcoming books, visit http://www.javasoft.com/books/Series.
We would like to thank the Corporate and Professional Publishing Group at Addison-Wesley for their partnership in putting together the Series. Our editor Mike Hendrickson and his team have done a superb job of navigating us through the world of publishing. Within Sun, the support of James Gosling, Ruth Hennigar, and Bill Joy of Sun Microsystems ensured that this series would have the resources it needed to be successful. A personal note of thanks to my children Christopher and James for putting a positive spin on the many trips to my office during the development of the Series.
Tom Ball Bill Joy Lee Boynton Tim Lindholm Patrick Chan Jonathan Payne David Connelly Sami Shaio Pavani Diwanji Doug Stein Amy Fowler Arthur van Hoff James Gosling Chris Warth Jim Graham Frank Yellin Herb Jellinek
Carla Schroer Vijah Srinivasan Kevin Smith Headley Williamson
Lisa Friendly Kathy Walrath James Gosling Doug Kramer Jonni Kanerva Frank Yellin Guy Steele Annette Wagner
Although the API hasn't reached perfection yet, we believe it's useful and hope to make it a ubiquitous layer, available to all Internet applications.
Arthur van Hoff
The extent of the API and the choice of functionality have been driven by several factors. First and foremost, the API should be simple and easy to use. Parts of the API, such as the support for multithreading, might introduce functionality that is new to you, but we think you'll find these new concepts simpler and easier to use than in most other programming environments.
The libraries in these booksare the first generation of an API for writing Internet programs. A simple form of an Internet program is an applet-a small Java program that can be embedded in an HTML page.
The API has been designed with the Java language in mind. Important Java features such as object orientation, garbage collection, and multithreading played an important role in the API design. Instead of taking existing libraries and simply rewriting them in Java, we took the opportunity to design and implement the API making full use of the Java language.
For Release 1.0, we've tried to stay away from certain complex functionality, such as video and 3D, so that library implementations can be ported easily. We can include only functionality that is not proprietary and that is easily implemented on many platforms.
We expect to add to the API, but not to subtract from it or change its behavior. The API documented in this book will remain available to all Java programs through future releases..
If you have ideas about how the API could be improved or how to implement some of the missing functionality, we would like to hear from you. Please send your ideas and implementations to firstname.lastname@example.org.
As you design and implement Java programs, you should write short test programs to verify your understanding of the classes. When in doubt, try it out!
The Java web site, http://java.sun.com/, contains many excellent and sometimes interactive explanations that can help you along. Another good source of information is the newsgroup comp.lang.java.
Another set of java.lang classes provide wrappers for primitive types. For example, the Integer class provides objects to contain int values.
Still other classes, such as ClassLoader, Process, Runtime, SecurityManager, and System, provide access to system resources. For other generally useful classes, see the java.util package.
The java.lang package is imported automatically into every Java program.
The java.util package also contains the Observer interface and Observable class, which allow objects to notify one another when they change.
Unless you're creating a window system-specific implementation of the AWT, you shouldn't need to use the interfaces in the java.awt.peer package.
The Unicode Standard: Worldwide Character Encoding, Version 1.0, Volume 1 ISBN 0-201-56788-1 and Volume 2 ISBN 0-201-60845-6. Additional information about Unicode 1.1 may be found at ftp://unicode.org.
Campione, Mary and Kathy Walrath. The Java Language Tutorial: Object-Oriented Programming for the Internet. Addison-Wesley, Reading, Massachusets, to appear 1996, ISBN 0-201-63454-6.
Gosling, James, Bill Joy and Guy Steele. The Java Language Specification. Addison-Wesley, Reading, Massachusetts, 1996, ISBN 0-201-63451-1.
Lindholm, Tim, and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, Reading, Massachusetts, 1996, ISBN 0-201-63452-X.
Packages This Package Prev Next Index