Synopses & Reviews
Learning Java provides an accessible yet comprehensive introduction to the programming language that has changed the way we think about computing. Java has become the language of choice for a wide variety of applications: web services, secure network systems, XML-based tools, reusable components, and mission-critical enterprise systems. Learning Java is filled with easy-to-follow code examples that guide you through Java's many features, APIs, and facilities.This new edition of Learning Java has been expanded and updated for Java 2 Standard Edition SDK 1.4. It comprehensively addresses important topics such as web applications, servlets, and XML that are increasingly driving enterprise applications. This edition provides full coverage of all Java 1.4 language features including assertions and exception chaining as well as new APIs such as regular expressions and NIO, the new I/O package. New Swing features and components are described along with updated coverage of the JavaBeans component architecture using the open source NetBeans IDE the latest information about Applets and the Java Plug-in for all major web browsers.The accompanying CD-ROM provides all you need to start working with Java immediately. In addition to the many example programs from the book, the CD includes the complete J2SE SDK 1.4, the NetBeans IDE, the Jakarta Project's Ant make utility and Tomcat application server as well as BeanShell, a simple open source Java scripting language developed by author Pat Niemeyer.
Synopsis
This updated edition introduces the basics of Java and everything necessary to get up to speed on the new 1.4 version quickly. CD contains the Java 2 SDK for Windows, Linux and Solaris.
About the Author
Patrick Niemeyer became involved with Oak (Java's predecessor) while working at Southwestern Bell Technology Resources. He is an independent consultant and author in the areas of networking and distributed applications. Pat is the author of BeanShell, a popular Java scripting language, as well as various other free goodies on the Net. Most recently, Pat has been developing enterprise architecture for A.G. Edwards. He currently lives in the Central West End area of St. Louis with various creatures.
Jonathan Knudsen is an author at O'Reilly & Associates. His books include The Unofficial Guide to Lego Mindstorms Robots, Java 2D Graphics, and Java Cryptography. He is the Courseware Writer for LearningPatterns.com.
Table of Contents
Preface; New Developments; Audience; Using This Book; Online Resources; Conventions Used in This Book; How to Contact Us; Acknowledgments; Chapter 1: Yet Another Language?; 1.1 Enter Java; 1.2 A Virtual Machine; 1.3 Java Compared with Other Languages; 1.4 Safety of Design; 1.5 Safety of Implementation; 1.6 Application and User-Level Security; 1.7 Java and the Web; 1.8 Java as a General Application Language; 1.9 A Java Road Map; Chapter 2: A First Application; 2.1 HelloJava; 2.2 HelloJava2: The Sequel; 2.3 HelloJava3: The Button Strikes!; 2.4 HelloJava4: Netscape's Revenge; Chapter 3: Tools of the Trade; 3.1 The Java Interpreter; 3.2 The Classpath; 3.3 Policy Files; 3.4 The Java Compiler; 3.5 Java Archive (JAR) Files; Chapter 4: The Java Language; 4.1 Text Encoding; 4.2 Comments; 4.3 Types; 4.4 Statements and Expressions; 4.5 Exceptions; 4.6 Assertions; 4.7 Arrays; Chapter 5: Objects in Java; 5.1 Classes; 5.2 Methods; 5.3 Object Creation; 5.4 Object Destruction; Chapter 6: Relationships Among Classes; 6.1 Subclassing and Inheritance; 6.2 Interfaces; 6.3 Packages and Compilation Units; 6.4 Visibility of Variables and Methods; 6.5 Arrays and the Class Hierarchy; 6.6 Inner Classes; Chapter 7: Working with Objects and Classes; 7.1 The Object Class; 7.2 The Class Class; 7.3 Reflection; Chapter 8: Threads; 8.1 Introducing Threads; 8.2 Threading an Applet; 8.3 Synchronization; 8.4 Scheduling and Priority; 8.5 Thread Groups; 8.6 Thread Performance; Chapter 9: Working with Text; 9.1 Other Text-Related APIs; 9.2 Strings; 9.3 Parsing and Formatting Text; 9.4 Internationalization; 9.5 The java.text Package; 9.6 Regular Expressions; Chapter 10: Core Utilities; 10.1 Math Utilities; 10.2 Dates; 10.3 Timers; 10.4 Collections; 10.5 Properties; 10.6 The Preferences API; 10.7 The Logging API; 10.8 Observers and Observables; Chapter 11: Input/Output Facilities; 11.1 Streams; 11.2 Files; 11.3 Serialization; 11.4 Data Compression; 11.5 The NIO Package; Chapter 12: Network Programming; 12.1 Sockets; 12.2 Datagram Sockets; 12.3 Simple Serialized Object Protocols; 12.4 Remote Method Invocation; 12.5 Scaleable I/O with NIO; Chapter 13: Programming for the Web; 13.1 Uniform Resource Locators (URLs); 13.2 The URL Class; 13.3 Handlers in Practice; Chapter 14: Servlets and Web Applications; 14.1 Servlets: Powerful Tools; 14.2 Web Applications; 14.3 The Servlet Life Cycle; 14.4 Web Servlets; 14.5 The HelloClient Servlet; 14.6 The Servlet Response; 14.7 Servlet Parameters; 14.8 The ShowParameters Servlet; 14.9 User Session Management; 14.10 The ServletContext API; 14.11 WAR Files and Deployment; 14.12 Reloading WebApps; 14.13 Error and Index Pages; 14.14 Security and Authentication; 14.15 Servlet Filters; 14.16 Building WAR Files with Ant; Chapter 15: Swing; 15.1 Components; 15.2 Containers; 15.3 Events; 15.4 Event Summary; 15.5 The AWT Robot!; 15.6 Multithreading in Swing; Chapter 16: Using Swing Components; 16.1 Buttons and Labels; 16.2 Checkboxes and Radio Buttons; 16.3 Lists and Combo Boxes; 16.4 The Spinner; 16.5 Borders; 16.6 Menus; 16.7 The PopupMenu Class; 16.8 The JScrollPane Class; 16.9 The JSplitPane Class; 16.10 The JTabbedPane Class; 16.11 Scrollbars and Sliders; 16.12 Dialogs; Chapter 17: More Swing Components; 17.1 Text Components; 17.2 Focus Navigation; 17.3 Trees; 17.4 Tables; 17.5 Desktops; 17.6 Pluggable Look-and-Feel; 17.7 Creating Custom Components; Chapter 18: Layout Managers; 18.1 FlowLayout; 18.2 GridLayout; 18.3 BorderLayout; 18.4 BoxLayout; 18.5 CardLayout; 18.6 GridBagLayout; 18.7 Nonstandard Layout Managers; 18.8 Absolute Positioning; 18.9 SpringLayout; Chapter 19: Drawing with the 2D API; 19.1 The Big Picture; 19.2 The Rendering Pipeline; 19.3 A Quick Tour of Java 2D; 19.4 Filling Shapes; 19.5 Stroking Shape Outlines; 19.6 Using Fonts; 19.7 Displaying Images; 19.8 Drawing Techniques; 19.9 Printing; Chapter 20: Working with Images and Other Media; 20.1 ImageObserver; 20.2 MediaTracker; 20.3 Producing Image Data; 20.4 Filtering Image Data; 20.5 Simple Audio; 20.6 Java Media Framework; Chapter 21: JavaBeans; 21.1 What's a Bean?; 21.2 The NetBeans IDE; 21.3 Properties and Customizers; 21.4 Event Hookups and Adapters; 21.5 Binding Properties; 21.6 Building Beans; 21.7 Limitations of Visual Design; 21.8 Serialization Versus Code Generation; 21.9 Customizing with BeanInfo; 21.10 Hand-Coding with Beans; 21.11 BeanContext and BeanContextServices; 21.12 The Java Activation Framework; 21.13 Enterprise JavaBeans; Chapter 22: Applets; 22.1 The Politics of Applets; 22.2 The JApplet Class; 22.3 The