The Java™ Tutorials
The Really Big Index
A list of all content pages in the
The Java™ Tutorials
The Java Technology Phenomenon
- About the Java Technology
- What Can Java Technology Do?
- How Will Java Technology Change My Life?
The "Hello World!" Application
- "Hello World!" for the NetBeans IDE
- "Hello World!" for Microsoft Windows
- "Hello World!" for Solaris OS and Linux
A Closer Look at the "Hello World!" Application
- Questions and Exercises: Getting Started
Common Problems (and Their Solutions)
Object-Oriented Programming Concepts
- What Is an Object?
- What Is a Class?
- What Is Inheritance?
- What Is an Interface?
- What Is a Package?
- Questions and Exercises: Object-Oriented Programming Concepts
Language Basics
- Variables
- Primitive Data Types
- Arrays
- Summary of Variables
- Questions and Exercises: Variables
- Operators
- Assignment, Arithmetic, and Unary Operators
- Equality, Relational, and Conditional Operators
- Bitwise and Bit Shift Operators
- Summary of Operators
- Questions and Exercises: Operators
- Expressions, Statements, and Blocks
- Questions and Exercises: Expressions, Statements, and Blocks
- Control Flow Statements
- The if-then and if-then-else Statements
- The switch Statement
- The while and do-while Statements
- The for Statement
- Branching Statements
- Summary of Control Flow Statements
- Questions and Exercises: Control Flow Statements
Classes and Objects
- Classes
- Declaring Classes
- Declaring Member Variables
- Defining Methods
- Providing Constructors for Your Classes
- Passing Information to a Method or a Constructor
- Objects
- Creating Objects
- Using Objects
- More on Classes
- Returning a Value from a Method
- Using the this Keyword
- Controlling Access to Members of a Class
- Understanding Class Members
- Initializing Fields
- Summary of Creating and Using Classes and Objects
- Questions and Exercises: Classes
- Questions and Exercises: Objects
- Nested Classes
- Inner Class Example
- Local Classes
- Anonymous Classes
- Lambda Expressions
- Method References
- When to Use Nested Classes, Local Classes, Anonymous Classes, and Lambda Expressions
- Questions and Exercises: Nested Classes
- Enum Types
- Questions and Exercises: Enum Types
Annotations
- Annotations Basics
- Declaring an Annotation Type
- Predefined Annotation Types
- Type Annotations and Pluggable Type Systems
- Repeating Annotations
- Questions and Exercises: Annotations
Interfaces and Inheritance
- Interfaces
- Defining an Interface
- Implementing an Interface
- Using an Interface as a Type
- Evolving Interfaces
- Default Methods
- Summary of Interfaces
- Questions and Exercises: Interfaces
- Inheritance
- Multiple Inheritance of State, Implementation, and Type
- Overriding and Hiding Methods
- Polymorphism
- Hiding Fields
- Using the Keyword super
- Object as a Superclass
- Writing Final Classes and Methods
- Abstract Methods and Classes
- Summary of Inheritance
- Questions and Exercises: Inheritance
Numbers and Strings
- Numbers
- The Numbers Classes
- Formatting Numeric Print Output
- Beyond Basic Arithmetic
- Summary of Numbers
- Questions and Exercises: Numbers
- Characters
- Strings
- Converting Between Numbers and Strings
- Manipulating Characters in a String
- Comparing Strings and Portions of Strings
- The StringBuilder Class
- Summary of Characters and Strings
- Autoboxing and Unboxing
- Questions and Exercises: Characters and Strings
Generics (Updated)
- Why Use Generics?
- Generic Types
- Raw Types
- Generic Methods
- Bounded Type Parameters
- Generic Methods and Bounded Type Parameters
- Generics, Inheritance, and Subtypes
- Type Inference
- Wildcards
- Upper Bounded Wildcards
- Unbounded Wildcards
- Lower Bounded Wildcards
- Wildcards and Subtyping
- Wildcard Capture and Helper Methods
- Guidelines for Wildcard Use
- Type Erasure
- Erasure of Generic Types
- Erasure of Generic Methods
- Effects of Type Erasure and Bridge Methods
- Non-Reifiable Types
- Restrictions on Generics
- Questions and Exercises: Generics
Packages
- Creating and Using Packages
- Creating a Package
- Naming a Package
- Using Package Members
- Managing Source and Class Files
- Summary of Creating and Using Packages
- Questions and Exercises: Creating and Using Packages
Exceptions
- What Is an Exception?
- The Catch or Specify Requirement
- Catching and Handling Exceptions
- The try Block
- The catch Blocks
- The finally Block
- The try-with-resources Statement
- Putting It All Together
- Specifying the Exceptions Thrown by a Method
- How to Throw Exceptions
- Chained Exceptions
- Creating Exception Classes
- Unchecked Exceptions The Controversy
- Advantages of Exceptions
- Summary
- Questions and Exercises
Basic I/O
- I/O Streams
- Byte Streams
- Character Streams
- Buffered Streams
- Scanning and Formatting
- Scanning
- Formatting
- I/O from the Command Line
- Data Streams
- Object Streams
- File I/O (Featuring NIO.2)
- What Is a Path? (And Other File System Facts)
- The Path Class
- Path Operations
- File Operations
- Checking a File or Directory
- Deleting a File or Directory
- Copying a File or Directory
- Moving a File or Directory
- Managing Metadata (File and File Store Attributes)
- Reading, Writing, and Creating Files
- Random Access Files
- Creating and Reading Directories
- Links, Symbolic or Otherwise
- Walking the File Tree
- Finding Files
- Watching a Directory for Changes
- Other Useful Methods
- Legacy File I/O Code
- Summary
- Questions and Exercises: Basic I/O
Concurrency
- Processes and Threads
- Thread Objects
- Defining and Starting a Thread
- Pausing Execution with Sleep
- Interrupts
- Joins
- The SimpleThreads Example
- Synchronization
- Thread Interference
- Memory Consistency Errors
- Synchronized Methods
- Intrinsic Locks and Synchronization
- Atomic Access
- Liveness
- Deadlock
- Starvation and Livelock
- Guarded Blocks
- Immutable Objects
- A Synchronized Class Example
- A Strategy for Defining Immutable Objects
- High Level Concurrency Objects
- Lock Objects
- Executors
- Executor Interfaces
- Thread Pools
- Fork/Join
- Concurrent Collections
- Atomic Variables
- Concurrent Random Numbers
- For Further Reading
- Questions and Exercises: Concurrency
The Platform Environment
- Configuration Utilities
- Properties
- Command-Line Arguments
- Environment Variables
- Other Configuration Utilities
- System Utilities
- Command-Line I/O Objects
- System Properties
- The Security Manager
- Miscellaneous Methods in System
- PATH and CLASSPATH
- Questions and Exercises: The Platform Environment
Regular Expressions
- Introduction
- Test Harness
- String Literals
- Character Classes
- Predefined Character Classes
- Quantifiers
- Capturing Groups
- Boundary Matchers
- Methods of the Pattern Class
- Methods of the Matcher Class
- Methods of the PatternSyntaxException Class
- Unicode Support
- Additional Resources
- Questions and Exercises: Regular Expressions
Java Applets
- Getting Started With Applets
- Defining an Applet Subclass
- Methods for Milestones
- Life Cycle of an Applet
- Applet's Execution Environment
- Developing an Applet
- Deploying an Applet
- Deploying With the Applet Tag
- Doing More With Applets
- Finding and Loading Data Files
- Defining and Using Applet Parameters
- Displaying Short Status Strings
- Displaying Documents in the Browser
- Invoking JavaScript Code From an Applet
- Invoking Applet Methods From JavaScript Code
- Handling Initialization Status With Event Handlers
- Manipulating DOM of Applet's Web Page
- Displaying a Customized Loading Progress Indicator
- Writing Diagnostics to Standard Output and Error Streams
- Developing Draggable Applets
- Communicating With Other Applets
- Working With a Server-Side Application
- Network Client Applet Example
- What Applets Can and Cannot Do
- Solving Common Applet Problems
- Questions and Exercises: Applets
Java Web Start
- Developing a Java Web Start Application
- Retrieving Resources
- Deploying a Java Web Start Application
- Setting Up a Web Server
- Displaying a Customized Loading Progress Indicator
- Running a Java Web Start Application
- Java Web Start and Security
- Common Java Web Start Problems
- Questions and Exercises: Java Web Start
Doing More With Java Rich Internet Applications
- Setting Trusted Arguments and Secure Properties
- System Properties
- JNLP API
- Accessing the Client Using JNLP API
- Cookies
- Accessing Cookies
- Customizing the Loading Experience
- Security in Rich Internet Applications
- Guidelines for Securing Rich Internet Applications
- Questions and Exercises: Doing More With Rich Internet Applications
Deployment In-Depth
- User Acceptance of RIAs
- Deployment Toolkit
- Deploying an Applet
- Customizing the Loading Screen
- Embedding JNLP File in Applet Tag
- Deploying a Java Web Start Application
- Changing the Launch Button
- Deploying Without Codebase
- Checking the Client JRE Software Version
- Java Network Launch Protocol
- Structure of the JNLP File
- Deployment Best Practices
- Reducing the Download Time
- Avoiding Unnecessary Update Checks
- Ensuring the Presence of the JRE Software
- Questions and Exercises: Deployment In-Depth
Deploying Self-Contained Applications
- Pre-Requisites for Packaging Self-Contained Applications
- Converting an Existing Application
- Using File Associations
- Adding an External Library
- Providing a Default Argument
- Using a Common Build File for All Platforms
- Using Multiple Entry Points
- Questions and Exercises: Self-Contained Applications
Packaging Programs in JAR Files
- Using JAR Files: The Basics
- Creating a JAR File
- Viewing the Contents of a JAR File
- Extracting the Contents of a JAR File
- Updating a JAR File
- Running JAR-Packaged Software
- Working with Manifest Files: The Basics
- Understanding the Default Manifest
- Modifying a Manifest File
- Setting an Application's Entry Point
- Adding Classes to the JAR File's Classpath
- Setting Package Version Information
- Sealing Packages within a JAR File
- Enhancing Security with Manifest Attributes
- Signing and Verifying JAR Files
- Understanding Signing and Verification
- Signing JAR Files
- Verifying Signed JAR Files
- Using JAR-related APIs
- The JarClassLoader Class
- The JarRunner Class
- Questions and Exercises: JAR
Getting Started with Swing
- About the JFC and Swing
- Compiling and Running Swing Programs
Learning Swing with the NetBeans IDE
- Setting up the CelsiusConverter Project
- NetBeans IDE Basics
- Creating the CelsiusConverter GUI
- Adjusting the CelsiusConverter GUI
- Adding the Application Logic
- Questions and Exercises: Learning Swing with the NetBeans IDE
Using Swing Components
- Using Top-Level Containers
- The JComponent Class
- Using Text Components
- Text Component Features
- The Text Component API
- How to Use Various Components
- How to Make Applets
- How to Use Buttons, Check Boxes, and Radio Buttons
- How to Use the ButtonGroup Component
- How to Use Color Choosers
- How to Use Combo Boxes
- How to Make Dialogs
- How to Use Editor Panes and Text Panes
- How to Use File Choosers
- How to Use Formatted Text Fields
- How to Make Frames (Main Windows)
- How to Use Internal Frames
- How to Use Labels
- How to Use Layered Panes
- How to Use Lists
- How to Use Menus
- How to Use Panels
- How to Use Password Fields
- How to Use Progress Bars
- How to Use Root Panes
- How to Use Scroll Panes
- How to Use Separators
- How to Use Sliders
- How to Use Spinners
- How to Use Split Panes
- How to Use Tabbed Panes
- How to Use Tables
- How to Use Text Areas
- How to Use Text Fields
- How to Use Tool Bars
- How to Use Tool Tips
- How to Use Trees
- How to Use HTML in Swing Components
- How to Use Models
- How to Use Icons
- How to Use Borders
- Solving Common Component Problems
- Questions and Exercises: Using Swing Components
Concurrency in Swing
- Initial Threads
- The Event Dispatch Thread
- Worker Threads and SwingWorker
- Simple Background Tasks
- Tasks that Have Interim Results
- Canceling Background Tasks
- Bound Properties and Status Methods
- Questions and Exercises: Concurrency in Swing
Using Other Swing Features
- How to Integrate with the Desktop Class
- How to Create Translucent and Shaped Windows
- How to Decorate Components with the JLayer Class
- How to Use Actions
- How to Use Swing Timers
- How to Support Assistive Technologies
- How to Use the Focus Subsystem
- How to Use Key Bindings
- How to Use Modality in Dialogs
- How to Print Tables
- How to Print Text
- How to Create a Splash Screen
- How to Use the System Tray
- Solving Common Problems Using Other Swing Features
Laying Out Components Within a Container
- A Visual Guide to Layout Managers
- Using Layout Managers
- How Layout Management Works
- How to Use Various Layout Managers
- How to Use BorderLayout
- How to Use BoxLayout
- How to Use CardLayout
- How to Use FlowLayout
- How to Use GridBagLayout
- How to Use GridLayout
- How to Use GroupLayout
- A GroupLayout Example
- How to Use SpringLayout
- Creating a Custom Layout Manager
- Doing Without a Layout Manager (Absolute Positioning)
- Solving Common Layout Problems
- Questions and Exercises: Laying Out Components within a Container
Modifying the Look and Feel
- How to Set the Look and Feel
- The Synth Look and Feel
- A Synth Example
- Nimbus Look and Feel
- Changing the Look of Nimbus
- Resizing a Component
- Changing the Color Theme
- For More Information
Drag and Drop and Data Transfer
- Introduction to DnD
- Default DnD Support
- Demo - BasicDnD
- TransferHandler Class
- Export Methods
- Import Methods
- TransferSupport Class
- Setting the Drop Mode
- Demo - DropDemo
- Choosing the Drop Action
- Demo - ChooseDropAction
- Showing the Drop Location
- Location Sensitive Drop
- Demo - LocationSensitiveDemo
- Empty Table Drop
- Drop Location Rendering
- Top-Level Drop
- Adding Cut, Copy and Paste (CCP)
- CCP in a Text Component
- CCP in a non-Text Component
- Using and Creating a DataFlavor
- Putting it All Together - DnD and CCP
- Further Information
- Solving Common Data Transfer Problems
Writing Event Listeners
- Introduction to Event Listeners
- General Information about Writing Event Listeners
- Listeners Supported by Swing Components
- Implementing Listeners for Commonly Handled Events
- How to Write an Action Listener
- How to Write a Caret Listener
- How to Write a Change Listener
- How to Write a Component Listener
- How to Write a Container Listener
- How to Write a Document Listener
- How to Write a Focus Listener
- How to Write an Internal Frame Listener
- How to Write an Item Listener
- How to Write a Key Listener
- How to Write a List Data Listener
- How to Write a List Selection Listener
- How to Write a Mouse Listener
- How to Write a Mouse-Motion Listener
- How to Write a Mouse-Wheel Listener
- How to Write a Property Change Listener
- How to Write a Table Model Listener
- How to Write a Tree Expansion Listener
- How to Write a Tree Model Listener
- How to Write a Tree Selection Listener
- How to Write a Tree-Will-Expand Listener
- How to Write an Undoable Edit Listener
- How to Write Window Listeners
- Listener API Table
- Solving Common Event-Handling Problems
- Questions and Exercises: Writing Event Listeners
Performing Custom Painting
- Creating the Demo Application (Step 1)
- Creating the Demo Application (Step 2)
- Creating the Demo Application (Step 3)
- Refining the Design
- A Closer Look at the Paint Mechanism
- Summary
- Solving Common Painting Problems
- Questions and Exercises: Performing Custom Painting
Introduction to Collections
Interfaces
- The Collection Interface
- The Set Interface
- The List Interface
- The Queue Interface
- The Deque Interface
- The Map Interface
- Object Ordering
- The SortedSet Interface
- The SortedMap Interface
- Summary of Interfaces
- Questions and Exercises: Interfaces
Aggregate Operations
- Reduction
- Parallelism
- Questions and Exercises: Aggregate Operations
Implementations
- Set Implementations
- List Implementations
- Map Implementations
- Queue Implementations
- Deque Implementations
- Wrapper Implementations
- Convenience Implementations
- Summary of Implementations
- Questions and Exercises: Implementations
Algorithms
Custom Collection Implementations
Interoperability
- Compatibility
- API Design
Date-Time Overview
- Date-Time Design Principles
- The Date-Time Packages
- Method Naming Conventions
Standard Calendar
- Overview
- DayOfWeek and Month Enums
- Date Classes
- Date and Time Classes
- Time Zone and Offset Classes
- Instant Class
- Parsing and Formatting
- The Temporal Package
- Temporal Adjuster
- Temporal Query
- Period and Duration
- Clock
- Non-ISO Date Conversion
- Legacy Date-Time Code
- Summary
- Questions and Exercises: Date-Time API
Introduction
- A Quick Example
- Before Internationalization
- After Internationalization
- Running the Sample Program
- Internationalizing the Sample Program
- Checklist
Setting the Locale
- Creating a Locale
- BCP 47 Extensions
- Identifying Available Locales
- Language Tag Filtering and Lookup
- The Scope of a Locale
- Locale-Sensitive Services SPI
Isolating Locale-Specific Data
- About the ResourceBundle Class
- Preparing to Use a ResourceBundle
- Backing a ResourceBundle with Properties Files
- Using a ListResourceBundle
- Customizing Resource Bundle Loading
Formatting
- Numbers and Currencies
- Using Predefined Formats
- Customizing Formats
- Dates and Times
- Using Predefined Formats
- Customizing Formats
- Changing Date Format Symbols
- Messages
- Dealing with Compound Messages
- Handling Plurals
Working with Text
- Checking Character Properties
- Comparing Strings
- Performing Locale-Independent Comparisons
- Customizing Collation Rules
- Improving Collation Performance
- Unicode
- Terminology
- Supplementary Characters as Surrogates
- Character and String APIs
- Sample Usage
- Design Considerations
- More Information
- Detecting Text Boundaries
- About the BreakIterator Class
- Character Boundaries
- Word Boundaries
- Sentence Boundaries
- Line Boundaries
- Converting Latin Digits to Other Unicode Digits
- Converting Non-Unicode Text
- Byte Encodings and Strings
- Character and Byte Streams
- Normalizing Text
- Working with Bidirectional Text with the JTextComponent Class
Internationalization of Network Resources
- Internationalized Domain Name
Service Providers for Internationalization
- Installing a Custom Resource Bundle as an Extension
Overview of the Java 2D API Concepts
- Coordinates
- Java 2D Rendering
- Geometric Primitives
- Text
- Images
- Printing
Getting Started with Graphics
Working with Geometry
- Drawing Geometric Primitives
- Drawing Arbitrary Shapes
- Stroking and Filling Graphics Primitives
Working with Text APIs
- Font Concepts
- Text Layout Concepts
- Physical and Logical Fonts
- Measuring Text
- Advanced Text Display
- Displaying Antialiased Text by Using Rendering Hints
- Using Text Attributes to Style Text
- Drawing Multiple Lines of Text
- Working with Bidirectional Text
Working with Images
- Reading/Loading an Image
- Drawing an Image
- Creating and Drawing to an Image
- Writing/Saving an Image
Printing
- A Basic Printing Program
- Using Print Setup Dialogs
- Printing a Multiple Page Document
- Working with Print Services and Attributes
- Printing the Contents of a User Interface
- Printing Support in Swing Components
Advanced Topics in Java2D
- Transforming Shapes, Text, and Images
- Clipping the Drawing Region
- Compositing Graphics
- Controlling Rendering Quality
- Constructing Complex Shapes from Geometry Primitives
- Supporting User Interaction
- Overview of the Sampled Package
- Accessing Audio System Resources
- Playing Back Audio
- Capturing Audio
- Processing Audio with Controls
- Using Files and Format Converters
- Overview of the MIDI Package
- Accessing MIDI System Resources
- Transmitting and Receiving MIDI Messages
- Introduction to Sequencers
- Using Sequencer Methods
- Using Advanced Sequencer Features
- Synthesizing Sound
- Introduction to the Service Provider Interfaces
- Providing Sampled-Audio Services
- Providing MIDI Services
Quick Start
- Creating a Project
- A Button is a Bean
- Wiring the Application
- Using a Third-Party Bean
Writing JavaBeans Components
- Properties
- Methods
- Events
- Using a BeanInfo
Advanced JavaBeans Topics
- Bean Persistence
- Long Term Persistence
- Bean Customization
JDBC Introduction
- JDBC Architecture
- A Relational Database Overview
JDBC Basics
- Getting Started
- Processing SQL Statements with JDBC
- Establishing a Connection
- Connecting with DataSource Objects
- Handling SQLExceptions
- Setting Up Tables
- Retrieving and Modifying Values from Result Sets
- Using Prepared Statements
- Using Transactions
- Using RowSet Objects
- Using JdbcRowSet Objects
- Using CachedRowSetObjects
- Using JoinRowSet Objects
- Using FilteredRowSet Objects
- Using WebRowSet Objects
- Using Advanced Data Types
- Using Large Objects
- Using SQLXML Objects
- Using Array Objects
- Using DISTINCT Data Type
- Using Structured Objects
- Using Customized Type Mappings
- Using Datalink Objects
- Using RowId Objects
- Using Stored Procedures
- Using JDBC with GUI API
Overview of the JMX Technology
- Why Use the JMX Technology?
- Architecture of the JMX Technology
- Monitoring and Management of the Java Virtual Machine
Introducing MBeans
- Standard MBeans
- MXBeans
Notifications
Remote Management
- Exposing a Resource for Remote Management By JConsole
- Creating a Custom JMX Client
Introduction to JAXP
- Overview of the Packages
- Simple API for XML APIs
- Document Object Model APIs
- Extensible Stylesheet Language Transformations APIs
- Streaming API for XML APIs
- Finding the JAXP Sample Programs
- Where Do You Go From Here?
Simple API for XML
- When to Use SAX
- Parsing an XML File Using SAX
- Implementing SAX Validation
- Handling Lexical Events
- Using the DTDHandler and EntityResolver
- Further Information
Document Object Model
- When to Use DOM
- Reading XML Data into a DOM
- Validating with XML Schema
- Further Information
Extensible Stylesheet Language Transformations
- Introducing XSL, XSLT, and XPath
- How XPath Works
- Writing Out a DOM as an XML File
- Generating XML from an Arbitrary Data Structure
- Transforming XML Data with XSLT
Streaming API for XML
- Why StAX?
- StAX API
- Using StAX
- Oracle's Streaming XML Parser Implementation
- Example Code
- Further Information
JAXP 1.5 and New Properties
- Background
- External Resources
- New Properties
- Scope and Order
- Relationship with the SecurityManager
- Property Settings in the JDK
- Using the Properties
- Error Handling
- StAX
- Conclusion
- References
Processing Limits
- New Limits
- Scope and Order
- Using the Limits
- Error Handling
- StAX
- Samples
Trail: RMI
- An Overview of RMI Applications
- Writing an RMI Server
- Designing a Remote Interface
- Implementing a Remote Interface
- Creating a Client Program
- Compiling and Running the Example
- Compiling the Example Programs
- Running the Example Programs
Security Features Overview
Creating a Policy File
- Set up a Policy File to Grant the Required Permission
- Start Policy Tool
- Grant the Required Permission
- Save the Policy File
Quick Tour of Controlling Applications
- Observe Application Freedom
- See How to Restrict Applications
- Set up the Policy File to Grant the Required Permissions
- Open the Policy File
- Grant the Required Permissions
- Save the Policy File
- See the Policy File Effects
API and Tools Use for Secure Code and File Exchanges
Signing Code and Granting It Permissions
- Steps for the Code Signer
- Download and Try the Sample Application
- Create a JAR File Containing the Class File
- Generate Keys
- Sign the JAR File
- Export the Public Key Certificate
- Steps for the Code Receiver
- Observe the Restricted Application
- Import the Certificate as a Trusted Certificate
- Set Up a Policy File to Grant the Required Permission
- Start Policy Tool
- Specify the Keystore
- Add a Policy Entry with a SignedBy Alias
- Save the Policy File
- See the Policy File Effects
Exchanging Files
- Steps for the Contract Sender
- Create a JAR File Containing the Contract
- Generate Keys
- Sign the JAR File
- Export the Public Key Certificate
- Steps for the Contract Receiver
- Import the Certificate as a Trusted Certificate
- Verify the JAR File Signature
Generating and Verifying Signatures
- Generating a Digital Signature
- Prepare Initial Program Structure
- Generate Public and Private Keys
- Sign the Data
- Save the Signature and the Public Key in Files
- Compile and Run the Program
- Verifying a Digital Signature
- Prepare Initial Program Structure
- Input and Convert the Encoded Public Key Bytes
- Input the Signature Bytes
- Verify the Signature
- Compile and Run the Program
- Weaknesses and Alternatives
Implementing Your Own Permission
- ExampleGame
- The HighScore Class
- The HighScorePermission Class
- A Sample Policy File
- Putting It All Together
- Steps for the HighScore Developer (Chris)
- Steps for the ExampleGame Developer (Terry)
- Steps for a User Running ExampleGame (Kim)
Creating and Using Extensions
- Installed Extensions
- Download Extensions
- Understanding Extension Class Loading
- Creating Extensible Applications
Making Extensions Secure
- Setting Privileges for Extensions
- Sealing Packages in Extensions
Classes
- Retrieving Class Objects
- Examining Class Modifiers and Types
- Discovering Class Members
- Troubleshooting
Members
- Fields
- Obtaining Field Types
- Retrieving and Parsing Field Modifiers
- Getting and Setting Field Values
- Troubleshooting
- Methods
- Obtaining Method Type Information
- Obtaining Names of Method Parameters
- Retrieving and Parsing Method Modifiers
- Invoking Methods
- Troubleshooting
- Constructors
- Finding Constructors
- Retrieving and Parsing Constructor Modifiers
- Creating New Class Instances
- Troubleshooting
Arrays and Enumerated Types
- Arrays
- Identifying Array Types
- Creating New Arrays
- Getting and Setting Arrays and Their Components
- Troubleshooting
- Enumerated Types
- Examining Enums
- Getting and Setting Fields with Enum Types
- Troubleshooting
Overview of Networking
- What You May Already Know About Networking in Java
- Networking Basics
Working with URLs
- What Is a URL?
- Creating a URL
- Parsing a URL
- Reading Directly from a URL
- Connecting to a URL
- Reading from and Writing to a URLConnection
All About Sockets
- What Is a Socket?
- Reading from and Writing to a Socket
- Writing the Server Side of a Socket
All About Datagrams
- What Is a Datagram?
- Writing a Datagram Client and Server
- Broadcasting to Multiple Recipients
Programmatic Access to Network Parameters
- What Is a Network Interface?
- Retrieving Network Interfaces
- Listing Network Interface Addresses
- Network Interface Parameters
Working With Cookies
- HTTP State Management With Cookies
- CookieHandler Callback Mechanism
- Default CookieManager
- Custom CookieManager
Generics
- Introduction
- Defining Simple Generics
- Generics and Subtyping
- Wildcards
- Generic Methods
- Interoperating with Legacy Code
- The Fine Print
- Class Literals as Runtime-Type Tokens
- More Fun with Wildcards
- Converting Legacy Code to Use Generics
- Acknowledgements
Full-Screen Exclusive Mode API
- Full-Screen Exclusive Mode
- Display Mode
- Passive vs. Active Rendering
- Double Buffering and Page Flipping
- BufferStrategy and BufferCapabilities
- Examples
Preparation for Java Programmer Language Certification
- Programmer Level I Exam
- Programmer Level II Exam
- Java SE 7 Upgrade Exam
Naming and Directory Concepts
- Directory Concepts
Overview of JNDI
- Naming Package
- Directory and LDAP Packages
- Event and Service Provider Packages
Software Setup
- LDAP Setup
- Java Application Setup
Naming and Directory Operations
- Naming Exceptions
- Lookup an Object
- List the Context
- Add, Replace or Remove a Binding
- Rename
- Create and Destroy Subcontexts
- Attribute Names
- Read Attributes
- Modify Attributes
- Add, Replace Bindings with Attributes
- Search
- Basic Search
- Filters
- Scope
- Result Count
- Time Limit
- Trouble Shooting Tips
Advanced Topics for LDAP Users
- LDAP v3
- JNDI as an LDAP API
- How LDAP Operations Map to JNDI APIs
- How LDAP Error Codes Map to JNDI Exceptions
- Security
- Modes of Authenticating to LDAP
- Authentication Mechanisms
- Anonymous
- Simple
- SASL
- Digest-MD5
- SSL and Custom Sockets
- More LDAP Operations
- LDAP Compare
- Search Results
- LDAP Unsolicited Notifications
- Connection Management
- Creation
- Closing
- Pooling
- Configuration
- Frequently Asked Questions
Java Objects in the Directory
- Storing and Reading Objects
- Serializable Objects
New features in JDK 5.0 and JDK 6
- Retrieving Distinguished Name
- Standard LDAP Controls
- Paged Results Control
- Sort Control
- Manage Referral Control
- Manipulating LdapName (Distinguished Name)
- Manipulating Relative Distringuished Name (RDN)
- Setting Timeout for Ldap Operations
Understanding the Sockets Direct Protocol
- Overview
- Creating an SDP Configuration File
- Enabling the SDP Protocol
- Debugging SDP
- Technical Issues with SDP
- Solaris and Linux Support
- Supported Java APIs
- For More Information
Introduction to JAXB
- JAXB Architecture
- Representing XML Content
- Binding XML Schemas
- Customizing Generated Classes and Java Program Elements
- JAXB Examples
- Basic Examples
- Customizing JAXB Bindings
- Java-to-Schema Examples
- For More Information