The Java Tutorial


Trail Map
Your guide to The JavaTM Tutorial

You can begin reading the tutorial sequentially, or visit only those trails that interest you. If you have questions about the tutorial (how to download it, when it was updated, how to give us feedback...), go to the tutorial's first page.

The tutorial's trails fall into three categories:

Trails Covering the Basics

Most, if not all, programmers need to know about the APIs
discussed in these trails and lessons.

Getting Started     TOC ]

Start here to write, build, and run your first Java application and applet.

  • The Java Phenomenon
  • The "Hello World" Application
  • The "Hello World" Applet
  • Common Problems (and Their Solutions)
  • Learning the Java Language     TOC ]

    Learn the language from variables, expressions, and flow-control to objects, classes, and interfaces.

  • Object-Oriented Programming Concepts
  • The Nuts and Bolts of the Java Language
  • Objects and Classes in Java
  • More Features of the Java Language
  • Common Problems (and Their Solutions)
  • Writing Applets     TOC ]

    Wanna spice up your web pages with applets? Discover what applets can, cannot, and should not do.

  • Overview of Applets
  • Taking Advantage of the Applet API
  • Practical Considerations of Writing Applets
  • Finishing an Applet
  • Common Problems (and Their Solutions)
  • Essential Java Classes     TOC ]

    Find out how to use the classes in the JDK API that you are most likely to use in your Java programs.

  • Using String and StringBuffer
  • Setting Program Attributes
  • Accessing System Resources
  • Handling Errors with Exceptions
  • Doing Two or More Tasks at Once: Threads
  • Reading and Writing (but no 'rithmetic)
  • Creating a GUI with JFC/Swing  [TOC ]

    Put a face on your program with the JFC Swing components.

  • Getting Started with Swing
  • Swing Features and Concepts
  • Using Swing Components
  • Using Other Swing Features
  • Laying Out Components Within a Container
  • Writing Event Listeners
  • Working with Graphics
  • Converting to Swing
  • Custom Networking     TOC ]

    Write programs that communicate with resources and other programs on the network.

  • Overview of Networking
  • Working with URLs
  • All About Sockets
  • All About Datagrams
  • To 1.1--And Beyond!     TOC ]

    Learn what's new in 1.1 and upcoming in 1.2, and how to convert programs from 1.0 to 1.1.

  • What's New in 1.1
  • Migrating to 1.1
  • A Preview of Things to Come
  •  

    Specialized Trails

    Many, but not all, programmers need the APIs
    covered by these trails and lessons.

    Overview     TOC ]
        by Monica Pawlan

    Find brief descriptions of the topics covered in The Java Tutorial Continued.

  • Overview
  • Collections     TOC ]
        by Joshua Bloch

    Use Java's collection framework to store and manipulate groups of related objects; it can can make your programs smaller, faster, and more reusable.

  • Introduction
  • Interfaces
  • Implementations
  • Algorithms
  • Custom Implementations
  • Interoperability
  • Internationalization     TOC ]
        by Dale Green

    Write programs for the global market. After internationalization, your software can support new languages and cultures without changes to the source code.

  • Introduction
  • Setting the Locale
  • Isolating Locale-Specific Data
  • Formatting
  • Working with Text
  • 2D Graphics     TOC ]
        by Deborah Adair

    Enhance the appearance of your GUI with shapes, color, stylized text, foreign-language text, and image processing. Also, learn how to add printing capability to your programs.

  • Overview of the Java 2D API
  • Displaying Graphics with Graphics2D
  • Manipulating and Displaying Images
  • Printing
  • Sound     TOC ]
        by Deborah Adair

    Play sounds in AIFF, AW, WAV, MIDI, or RAF formats in your applets and applications.

  • Overview
  • Playing Sounds
  • JavaBeans     TOC ]
        by Andy Quinn

    Learn how to develop platform-independent components in the Java programming language. This trail covers JavaBeans basics, the BeanBox, and the Beans Development Kit.

  • JavaBeans Concepts and the Beans Development Kit
  • Using the BeanBox
  • Writing a Simple Bean
  • Properties
  • Manipulating Events in the BeanBox
  • The BeanInfo Interface
  • Bean Customization
  • Bean Persistence
  • New Features
  • JDBC Database Access     TOC ]
        by Maydene Fisher

    Use the JDBC to connect to a database, send SQL statements, and process the results. The JDBC provides uniform access to a wide range of relational databases and provides a common base on which database tools can be built.

  • JDBC Basics
  • New Features in the JDBC 2.0 API
  • RMI     TOC ]
        by Ann Wollrath and Jim Waldo

    Call methods on an object running in another VM. RMI is often used to implement client/server applications.

  • An Overview of RMI Applications
  • Writing an RMI Server
  • Creating a Client Program
  • Compiling and Running the Example
  • IDL     TOC ]
        by Jim Inscore

    Java IDL provides CORBA-compliant interoperability for programs written in Java. This trail gives you an overview of CORBA and takes you through the steps to building a CORBA-compatible client/server combination with Java IDL.

  • Introducing Java IDL
  • The Hello Client/Server Example
  • Summary
  • Servlets     TOC ]
        by Cynthia Bloch

    Learn how to use the Servlet API to extend the functionality of your server.

  • Overview of Servlets
  • Interacting with Clients
  • The Servlet Life Cycle
  • Saving Client State
  • The servletrunner Utility
  • Running Servlets
  • Security in JDK 1.2     TOC ]
        by Mary Dageforde

    Learn how the built-in security features protect you from malevolent programs. See how to use tools for controlling access to resources, generating and checking digital signatures, and creating and managing keys needed for signature generation and checking. See how to incorporate security checks and cryptography services into your programs.

  • Security Features Overview
  • Quick Tour of Controlling Applets
  • Quick Tour of Controlling Applications
  • API and Tools Used for Secure Code and File Exchanges
  • Signing Code and Granting It Permissions [Tools]
  • Exchanging Files [Tools]
  • Generating and Verifying Signatures [API]
  • Implementing Your Own Permission
  • Summaries
  • Security in JDK 1.1     TOC ]
        by Mary Dageforde

    See how to use the JDK Security API in JDK 1.1 to generate and verify digital signatures.

  • Java Security API Overview
  • Using the Security API to Generate and Verify a Signature
  • JAR Files     TOC ]
        by Alan Sommerer

    Bundle a Java program and its resources into an easily downloadable, secure archive.

  • Using JAR Files: The Basics
  • Signing and Verifying JAR Files
  • Using JAR-related APIs Introduced in 1.2
  • The Extension Mechanism     TOC ]
        by Alan Sommerer

    Expand the functionality of the Java platform by using a standard, scalable way to make custom APIs available to all applications running on the Java platform.

  • Creating and Using Extensions
  • Setting Extension Security Privileges
  • Java Native Interface     TOC ]
        by Beth Stearns

    Use the Java Native Interface API to retain your investment in code written in other languages. The JNI lets you integrate native methods written in C or C++ with Java programs.

  • Overview of the JNI
  • Writing Java Programs with Native Methods
  • Integrating Java and Native Programs
  • Interacting with Java from the Native Side
  • Invoking the Java Virtual Machine
  • Summary
  • Reflection     TOC ]
        by Dale Green

    Learn how to dynamically create objects, invoke methods, access fields, and examine classes.

  • Examining Classes
  • Manipulating Objects
  • Working with Arrays
  • Summary of Classes
  •  

    Comprehensive Examples

    All programmers can benefit from looking at
    large, real-world examples.

    Putting It All Together     TOC ]

    Explore a comprehensive example in depth to learn about the organization and interaction of the components of a Java program.

  • BINGO!
  •  
    All of the material in The Java Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.