Table of Contents


Trail Map: The Java Language Tutorial

Welcome to The Java Language Tutorial: Object-Oriented Programming for the Internet

The Java Language Tutorial is a practical, on-line guide to writing programs in the Java language. For information about the structure and organization of this tutorial please refer to About this Tutorial.

Note: This draft reflects the API distributed in the 1.0 Beta Java Developers Kit (JDK). For information on how the API has changed and how to get the JDK, see the JDK home page. For more information about how this draft differs from the first and second drafts, see This is a Draft!.

Getting Started

The most common Java programs are applications and applets. Applications are stand-alone programs, such as the HotJava browser. Applets are similar to applications, but they don't run on their own. Instead, applets adhere to a set of conventions that lets them run within a Java-compatible browser. If you're using a browser that can view applets, then you should see an animation just below this paragraph -- that's an applet embedded in this HTML page.

The "Hello World" Application -- Start here if you want to create stand-alone Java applications.
The "Hello World" Applet -- Start here if you are interested in writing applets only.
Besides applications and applets, you can also write two types of handlers -- programs that a Java-compatible browser loads when it encounters a protocol or content type that it hasn't seen yet. Each protocol handler understands a particular protocol (such as http: or doc:) and translates it into a form that your Java-compatible browser can display. Similarly, each content handler understands and translates a particular MIME type/subtype combination, such as text/plain or image/jpeg.

The "run:" Protocol Handler -- A step-by-step example of writing a protocol handler.
The "text/plain" Content Handler -- A step-by-step example of writing a content handler.


What Next?

Now that you've seen how to write a Java program, you can proceed with any of the topics below.

Writing Java Programs -- These lessons discuss techniques and concepts that any Java programmer can use.
Writing Applets -- These lessons discuss techniques and concepts that are specific to writing Java applets.
Creating a User Interface -- Here's the information you need to create the user interface of your applet or application.
The Java Development Environment -- Take a look here for information about the Java development environment, tools, how to structure and manage your programming environment, debugging techniques and memory management techniques.
Integrating Native Methods into Java Programs -- These lessons show you everything you need to know to write native methods in the Java language. A native method is a Java method whose implementation is provided in another programming language such as C. This lesson includes step-by-step instructions and a comprehensive example program.
Networking These lessons will have the information you'll need if your program deals with the network.
Extending the HotJava Browser -- These lessons will have information on writing protocol handlers and content handlers -- loadable modules that extend the capabilities of the HotJava browser.
How the Java Language Differs from C and C++ -- This trail points out the differences between the Java language and C and C++.
Troubleshooting -- Follow this trail to find all of the pages that discuss troubleshooting.


Table of Contents