Java Technology Home Page

Advanced Search

Java Technology Home Page
Technologies
- J2EE
- J2SE
- J2ME
- XML
- Other
Downloads
- Early Access
Documentation
- APIs
- Tutorials
- Code Samples
- See All
Spotlight
- Industry News
- Web Services
- Wireless
Developer Services
- Bug Database
- Forums
- Support
- See All
Java BluePrints
    Printable Page  Printable Page

Index of Code Samples

This is a master index of JavaTM programming language code samples organized by topic. Your browser's built-in search function in the Edit menu can also help you locate topics.

Cross-Platform Technologies

  • Internationalization: Designing an application so it can be adapted to various languages and regions without engineering changes. Localization is the process of adapting software for a specific region or language by adding locale-specific components and translating text.

  • Java BluePrintsTM: Illustrating design patterns and best practices for Java platform-based end-to-end (client-server) solutions.

  • Performance Tuning: Learning strategies and tactics for optimizing the performance of programs written in the Java programming language.

  • Security: Signing and verifying signed data, encrypting and decrypting data, and writing a security manager. A security manager is a Java virtual machine (JVM1) object that implements a security policy such as prompting an end user for password verification.

JiniTM Network Technology

J2EETM Platform

These code samples show you how to use the J2SE and J2EE platform APIs, for writing programs that run on Java platform-enabled servers.

Application Clients

  • Desktop applications: Writing client programs that run on a Java platform-enabled client machine. A desktop application might connect to a server-side technology such as a J2EE server.

Business Processing

Client Communications

  • JavaServer PagesTM Technology: Creating Web content that has both static and dynamic components.

  • Servlets: Extending a server program to enhance its functionality. One very common use for servlets is to extend a Web server by providing dynamic Web content.

Message Communications

Network Communications

  • JDBC Technology: Invoking SQL commands to create database tables, access the data stored in a table, and create and manage distributed transaction. The J2SE 1.4 and all versions of the J2EE platforms provide these APIs. Prior to J2SE 1.4, you have to download the javax.sql package for distributed transactions separately.

  • J2EE Connector Architecture: Enabling J2EE components such as enterprise beans to connect to and interact with Enterprise Information Systems (EISs).

  • Resource Connections: Setting Enterprise beans and Web components up to access resources such as databases, a mail session, Java Message Service objects, and URLs.

  • Transactions: Rolling back a transaction in the event of an error and maintaining database integrity.

J2METM Platform/Small Devices

  • J2ME Tech Tips
  • Small devices: Writing client programs that run on small wireless devices such as cell phones, personal digital assistants, and smart cards, and larger wired or wireless devices such as Internet-enabled smart phones.

J2SE Platform

These code samples show how to use core APIs from the J2SE platform, which aggregates APIs that can apply to both distributed and non-distributed applets and applications. For additional code samples that apply to the J2SE platform, see also:

Advanced Topics

  • Reference Objects: Maintaining special references to objects that allow the program to interact with the garbage collector in limited ways.

  • Reflection: Representing or reflecting the classes, interfaces, and objects in the JVM.

  • Threaded Programs: Timing, setting thread priority, and synchronizing threads.

Applets

  • Applets: Writing small client programs that run in a Java platform-enabled browser. The small program is embedded in a web page, and might connect to a server-side technology such as a J2EE server. Running applets securely using Java Web Start is also covered.

Classes, Objects, & Inheritance

Deployment

Essential APIs

  • Characters & Strings: Performing character and string operations.

  • Collections: Grouping multiple elements into a single unit (collection). Collections let you store, retrieve, and manipulate data, and transmit data from one method to another.

  • Error Handling: Using exceptions for error handling in the Java programming language.

  • JavaBeansTM Technology: Using APIs and tools that let you create reusable, platform-independent software components that you can combine into applets, applications, or composite components.

  • Language Basics: Using variables, arrays, operators, flow of control, and scope.

  • Numbers and Math Operations: Using floats, doubles, arithmetic operations, converting numbers to strings, trigonometry, and more.

  • Reading and Writing Data: Reading data from and write data to external storage. Includes serialization and custom protocol handling.

Graphical User Interfaces (GUIs)

  • Graphical User Interfaces with JFC Swing: Building GUIs with the Swing package, which is part of the Java Foundation Classes (JFC). Includes code samples for the Accessibility API.

  • Multi-Media: Enhancing a user interface with 2D graphics, 3D graphics, printing, imaging, and sound.

Network Communications

  • CORBA/IDL: Letting distributed objects interact regardless of whether they are written in the Java programming language or another language.

  • Java Native Interface (JNI): Integrating native code into programs written in the Java programming language.

  • Remote Method Invocation (RMI): Establishing remote communications between programs written in the Java programming language. RMI enables an object running in one JVM to invoke methods on an object running in another JVM.

Open Source

These code samples are from various open source repositories.

XML/Web Services

  • Java API for XML processing (JAXP): Accessing XML documents either serially (SAX) or in random access mode (DOM).

  • Web Services: Creating web-based services that are accessed by business application programs. The service receives the request for its services and returns a response.

Reader Feedback

Tell us what you think of this section.

Duke

 Very worthwhile   Worthwhile   Not worthwhile

Please type any comments you have here:


1 As used on this web site, the terms Java virtual machine or JVM mean a virtual machine for the Java platform.
  Beta Search  
 

Help Test our new Search Engine for Java Technology

Powered by Google

 

  Code Samples on Other Sun Sites  
 

Access1.Sun.Com: has code samples and technical articles sections with many excellent code samples.

Java Series Books: Some have code samples available as separate downloads. Many are referenced in this index, but you might want to check the book list too.

Sun Community Source Licensing: Source code and binary downloads based on Sun's Community Source Licensing principles.

SunTM ONE Middleware Developer code samples.

Sun ONE Platform Code Samples from the Sun ONE for Developers site.

Sun ONE Logistics Application from the Sun ONE for Developers site.

Sun ONE Studio: Using IDEs for applications development on Sun ONE Studio Developer Resources.


 

[ This page was last updated Sep-11-2002 ]

Company Info | Licensing | Employment | Press | Help |
JavaOne | Java Community Process | Java Wear and Books
 
 
Unless otherwise licensed, code in all
technical manuals herein (including articles,
FAQs, samples) is provided under this License.

Sun Microsystems, Inc.

Copyright © 1995-2002 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.