What do the Rolling Stones and Sun(tm) Microsystems
have in common? First,
both organizations have sites on the World Wide Web to promote their work.
Second, each has chosen Java as a new way to enliven their World Wide Web
WHAT IS JAVA ?
Java is a programming language developed by Sun Microsystems
that brings animation and interaction to the World Wide Web.
HotJava is the name of the software developed by Sun which
you can use to observe and interact with Java programs. Java
unleashes a level of interactivity that has never been
possible on the Web. This book explores and introduces you to
Java 's potential for distributing interactive, executable
People and organizations use the World Wide Web to communicate globally
and instantly. Using the Internet as a network for data transfer, the Web
employs a form of expression called hypertext that connects related
information in web-like structures. Combined with multimedia, the
resulting webs of hypermedia have opened new possibilities for expression
But something has been missing from the Web since its introduction to the
world in the early 1990s. Although the amount of Web data traffic and the
number of computers offering information on the Web has risen
dramatically, the content of the pages has lacked important expressive and
interactive qualities. While often intriguing, informative, and useful,
Web content has been devoid of the degree of interactivity offered by many
multimedia and hypermedia systems that run on non-networked computers. So
although the Web fostered world-wide interconnections among people and
information, it has only enabled people to observe: read text, watch
videos, listen to music, and explore information.
The unbounded universe of possibilities on the Web may lead some users to
feel that the hyperlinks just keep leading them on, until ultimately, the
Web seems just a road to nowhere: with no there
there. Java changes all
this. Java makes destinations possible for Web users.
Java enables developers to create content that can be delivered to and run
by users on their computers. This software can support anything that
programmers can dream up: spreadsheets, tutorials, animations, and
interactive games. With the Web page as the delivery platform, this
software can support a variety of information tasks with true
interactivity; users can get continuous, instantaneous feedback for
applications in visualization, animation and computation.
Users of the Web in the dawning Java age may indeed find a there
Web: a place to play, work, or learn.
Why Java ?
Java is just one part of the integrated set of systems that support World
Wide Web communication. Java is an entirely separate programming language
from the markup scheme for defining hypertext, the Hypertext Markup
Language (HTML). Java doesn't replace HTML, nor does it negate all
current work that has been developed or deployed on the Web.
Java connects with HTML and the Web through a special HTML tag called
which allows developers to include special Java programs called
applets on Web pages. These applets are essentially software programs that
the user's browser downloads (automatically, as part of Web page
observation) and executes. With graphical input and output possible
through the applet on the page, Java thus opens windows to into richer
levels of interactivity on the Web.
Why This Book?
The purpose this book is to give you an understanding of what Java is,
how it transforms Web communication, and Java 's principle technical
This book delves into the possibilities Java offers in animation,
interaction, and distributed network communication. This book aims to help
Appreciate the profound way Java transforms the World Wide Web
Grasp conceptually what is involved with using Java , including the HTML-to-Java connection and the roles of the HotJava browser and
the Java language
Learn about the HotJava browser and how to download use it
Understand how the Java language works; including the basics of
data definition and program control
Gain insight into how Java follows an object-oriented paradigm that encourages software reusability
See some example Java applets that support animations,
interactivity, and network applications
How to Use This Book
This book is an introduction to Java 's essentials: how Java connects
with the Web, how to view Java programs, and the basics of constructing
Java programs. This book is organized so that users at all levels can
traverse it in a variety of paths.
The Scope of This Book
This book discusses the significance of Java and showcases the kinds of
applications it makes possible. This book provides a quick overview of the
HotJava browser, how to obtain it, and how it can be used to navigate the
Web. The book then surveys the main features of the Java language,
describing the basics of its procedural programming features and how it
supports the object-oriented paradigm. This language description includes
many examples[md]showing the very basics for applets and applications.
Finally, the book surveys many existing Java programs and examines what
kind of communication they make possible and the basics of how they work.
This book cannot possibly do justice to the rich and very rapid ways that
Java is developing technically and expressively. As such, this book is
limited in two ways:
It covers the alpha release of Java /HotJava that was available in
the summer of 1995. A beta release of Java /HotJava is expected for
later in 1995. The support web for this book
(https://www.december.com/works/java.html) contains a summary of
changes relevant to this book after the beta release is available.
This book is not meant to be a comprehensive reference or
advanced programming guide for Java . It instead provides a quick start for
new users, project planners, and developers, with coverage of
introductory conceptual and beginning technical information about
Java , with pointers to online locations of full and current
Organization of This Book
This book is organized into parts, each of which contains three chapters.
Each part introduces the essentials of Java from a different perspective,
and each chapter in the parts addresses a central main point stated in a
declarative sentence as the chapter title. Here is a summary of the
contents in these parts:
Part I is an overview of the potential of the Web and Java . These
chapters explore Java 's capability to deliver distributed, executable
content, Java 's technical design for flexibility and extensibility, and
Java s relationship with the Web as a system of communication for
distributing networked hypermedia.
Part II surveys of Java 's capabilities for animation, interaction, and
information distribution. These chapters discuss many case studies
demonstrating Java in action. You can try out some of the examples shown
and learn about key code programming techniques of these examples.
Part III is an overview of the HotJava browser. The first chapter in this
part describes how you can download and set up the HotJava , Sun
Microsystems demonstration Java -enabled Web browser. The other chapters
explore the important difference between HotJava and other Web browsers
and how you can use HotJava to navigate the Web.
Part IV introduces the basics of developing Java Programs. These
chapters explain Java 's procedural features as well as Java 's object-
oriented features to support classes. This part concludes with a brief
example case study of applet design and implementation.
The appendices describe sources of further information, a summary of the
Java language essentials as well as other supporting information for Java
and Web development. The appendix defines terms about Java and the Web
used in this book.
Who Might Use This Book?
Managers and planners who are interested in seeing what Java
technology might do for their organization
Information developers who want to get an idea of how Java works
Web developers and programmers who want to see quickly how to
expand the level of interactivity of their information with Java
Students in online communication or hypermedia courses who need to
grasp the essentials of Java
How Might You Use This Book?
If you are a new Internet/Web user: Get an idea of how the Web
relates to the Internet and Web with parts I and II, skipping
over the programming features described in part II . Check part
III or ask your online service provider or administrator if your
computer can support Java -enabled browsers. To start writing
Java applets, read part IV and then take another look at the
applications in part II.
If you are a managers/project planner: Chapter 1 summarizes the
key concepts of Java s potential for communication. Chapter 2 is a
technical summary of Java , and chapter 3 examines the relationship
of Java to the Web in more detail. For planning user access to Java
content, youll need to obtain Java -enabled browsers as described
in part III. For planning or managing programming projects
involved with Java read parts II and IV.
If you are a Web developer: Go right to part II to look at what
Java is already making possible on the Web. Find out if your
platform supports a Java -enabled browser, and, if possible, get a
HotJava browser as described in part III. Read part IV for an
overview of Java programming. Part I is a summary overview of
Java ; in particular read chapter 3s discussion of the relationship
of Java to the Web and what new kinds of development Java make make
If you are an application programmer: Check to see if your
development platform supports HotJava as described in part III.
Chapter 2 as well as appendix B are a key technical summaries of
Java . If your platform supports a Java -enabled browser, then try
out the exercises in part IV in detail and skim parts II and I for
examples. Use this books support web to get the latest versions of
this source code. Use online information sources listed in
appendix A to get the more detailed information about the Java
To connect to the latest information
about this book's contents, open the URL:
This support web provides links to online information
about the book, code samples discussed,
and updates on resources and related information.
Check with the errata page of this support web for corrections,
and send reports of other errors, questions, or comments to
the author at firstname.lastname@example.org.