Preface

This book is about the Java™ language and programming environment. If you’ve been at all active on the Internet in the past few years, you’ve heard a lot about Java. It’s one of the most exciting developments in the history of the Internet, rivaling the creation of the World Wide Web. Java became the darling of the Internet programming community as soon as the alpha version was released. Immediately, thousands of people were writing Java applets to add to their web pages. Interest in Java only grew with time, and support for Java in Netscape Navigator guaranteed it would be a permanent part of the Net scene.

What, then, is Java? Java is a network programming language that was developed by Sun Microsystems. It’s already in widespread use for creating animated and interactive web pages. However, this is only the start. The Java language and environment are rich enough to support entirely new kinds of applications, like dynamically extensible browsers and mobile agents. There are entirely new kinds of computer platforms being developed around Java (handheld devices and network computers) that download all their software over the network. In the coming years, we’ll see what Java is capable of doing; fancy web pages are fun and interesting, but they certainly aren’t the end of the story. If Java is successful (and that isn’t a foregone conclusion), it could change the way we think about computing in fundamental ways.

This book gives you a head start on a lot of Java fundamentals. Learning Java attempts to live up to its name by mapping out the Java language, its class libraries, programming techniques, and idioms. We’ll dig deep into interesting areas and at least scratch the surface of the rest. Other titles in the O’Reilly & Associates Java Series will pick up where we leave off and provide more comprehensive information on specific areas and applications of Java.

Whenever possible, we’ll provide meaningful, realistic examples and avoid cataloging features. The examples are simple but hint at what can be done. We won’t be developing the next great “killer app” in these pages, but we hope to give you a starting point for many hours of experimentation and tinkering that will lead you to learn more on your own.

New Developments

This book, Learning Java, is actually the third edition—reworked and retitled—of O’Reilly’s popular Exploring Java. We’ve de-emphasized web-page applets this time around, reflecting their diminishing role over the past couple of years in creating “smart” web pages. Other technologies have filled in the gap: JavaScript on the client side, and Java servlets and Active Server Pages on the server side.

We cover the most interesting features of Sun’s newest release of Java, officially called Java 2 SDK Version 1.3 . (In the old days, it would have been called “JDK,” for “Java development kit;” we use the newer, officially blessed “SDK,” for "software development kit,” throughout this book.) These features include servlets, the Java Media Framework ( JMF), timers, the collections, 2D graphics, and image-processing APIs, using the Java security manager, and using Java 2 signed applets.

Another important change, though not as recent as SDK 1.3, is the ascendancy of Java Swing as the main API for graphical user interface programming. Much of the material relating to AWT, Java’s original GUI programming interface, has been recast and updated to use Swing facilities.

Get Learning Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.