The Java virtual machine is great for performing fundamental computational tasks, like arithmetic and method invocation, but it lacks features for doing important computer-oriented things like displaying graphics, communicating over a network, and so on. It's also shy on helpful tools like hash tables, string manipulations, and so forth.
The Java platform includes the JVM and a collection of important classes. These classes begin with the package name "java." The package java.applet provides an interface to a web browser. The package java.io provides input and output capabilities. There are many others.
PersonalJava is a subset of the Java platform. It's designed for personal devices smaller than a home computer but bigger than the computer embedded in a toaster, such as hand-held computers and television set-top boxes. It includes the java.awt classes for displaying graphics, but some features may be disabled (like scroll bars). It also lacks the database connectivity features found in java.sql and the cryptography in java.security.
Even smaller than the PersonalJava platform is EmbeddedJava, which is designed to work in low-memory, low-computing-power environments like air conditioners, elevator controllers, and toasters.
The JVM cannot function independent of the Java platform. Throughout this book we will assume a tiny environment containing only some of the classes in java.lang:
Others are discussed as appropriate. This ultraminimal environment is found in all environments; all examples should run on any platform. Sometimes the examples include references to classes in more complicated platforms, like java.awt.Window, to give the example more flavor and to make it more realistic. In these cases the reader can easily substitute another, less interesting class.