1.3 Java Platform

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:

  • java.lang.Object, which is the base class of the entire Java class hierarchy

  • java.lang.ClassLoader, which introduces new classes into the system

  • java.lang.String, which represents strings of text

  • java.lang.Class, which represents classes

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.

Programming for the Java Virtual Machine
Programming for the Javaв„ў Virtual Machine
ISBN: 0201309726
EAN: 2147483647
Year: 1998
Pages: 158
Authors: Joshua Engel

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net