Platform Notes


Java has gone through five major versions. The first official release was JDK 1.0, and its last bug-fixed version was 1.0.2. The second major release is Java JDK 1.1, and the latest bug-fixed version is 1.1.9, though it may be up from that by the time you read this book. The third major release, in December 1998, was to be known as JDK 1.2, but somebody at Sun abruptly renamed JDK 1.2 at the time of its release to Java 2, and the implementation is known as Java 2 SDK 1.2. The current version as of the writing of the first edition of this book was Java 2 SDK 1.3 (JDK 1.3), which was released in 2000.

As the first edition of this book went to press, Java 2 Version 1.4 was about to appear; it entered beta (which Sun calls "early access") around the time of the book's completion so I could mention it only briefly. The second edition of this book looks to have better timing; Java 2 Version 1.5 is in beta as I am updating the book.

This book is aimed at the fifth version, Java 2 Standard Edition, Version 1.5. By the time of publication, I expect that all Java projects in development will be using JDK 1.4, with a very few wedded to earlier versions for historical reasons. I have used several platforms to test this code for portability. I've tested with Sun's Linux JDK. For the mass market, I've tested many of the programs on Sun's Win32 (Windows 2000/XP/2003) implementation. And, "for the rest of us," I've done most of my recent development using Apple's Mac OS X Version 10.2.x and later . However, since Java is portable, I anticipate that the vast majority of the examples will work on any Java-enabled platform, except where extra APIs are required. Not every example has been tested on every platform, but all have been tested on at least one and most on more than one.

The Java API consists of two parts: core APIs and noncore APIs. The core is, by definition, what's included in the JDK that you download for free from http://java.sun.com/. Noncore is everything else. But even this "core" is far from tiny: it weighs in at around 50 packages and well over 2,000 public classes, averaging around 12 public methods each. Programs that stick to this core API are reasonably assured of portability to any Java platform.

The noncore APIs are further divided into standard extensions and nonstandard extensions. All standard extensions have package names beginning with javax.[3] (and reference implementations are available from Sun). A Java licensee (such as Apple or IBM) is not required to implement every standard extension, but if it does, the interface of the standard extension should be adhered to. This book calls your attention to any code that depends on a standard extension. Little code here depends on nonstandard extensions, other than code listed in the book itself. My own package, com.darwinsys, contains some utility classes used here and there; you will see an import for this at the top of any file that uses classes from it.

[3] Note that not all packages named javax. are extensions: javax.swing and its subpackages the Swing GUI packages used to be extensions, but are now core.

In addition, two other platforms, the J2ME and the J2EE, are standardized. Java 2 Micro Edition is concerned with small devices such as handhelds (PalmOS and others), cell phones, fax machines, and the like. Within J2ME are various "profiles" for different classes of devices. At the high end, the Java 2 Enterprise Edition (J2EE) is concerned with building large, scalable, distributed applications. Servlets, JavaServer Pages, JavaServer Faces, CORBA, RMI, JavaMail, Enterprise JavaBeans© (EJBs), Transactions, and other APIs are part of the J2EE. J2ME and J2EE packages normally begin with "javax" as they are not core J2SE packages. This book does not cover J2ME at all but includes a few of the J2EE APIs that are also useful on the client side, such as RMI and JavaMail. As mentioned earlier, coverage of Servlets and JSPs from the first edition of this book has been removed as there is now a Servlet and JSP Cookbook.



Java Cookbook
Java Cookbook, Second Edition
ISBN: 0596007019
EAN: 2147483647
Year: 2003
Pages: 409
Authors: Ian F Darwin

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