Previous | Next | Trail Map | Getting Started | Table of Contents


Getting Started

by Kathy Walrath and Mary Campione

The lessons in this trail show you the simplest possible Java programs and tell you how to compile and run them. They then go on to explain the programs, giving you the background knowledge you need to understand how they work.

The most common Java programs are applications and applets. Applications are standalone programs, such as the HotJava browser. Applets are similar to applications, but they don't run standalone. 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, you should see an animation just below this paragraph -- that's an applet embedded in this HTML page.


Before you go on: If you don't own a Java development environment, you might want to download the Java Development Kit (JDK). The JDK provides a compiler you can use to compile all kinds of Java programs. It also provides an interpreter you can use to run Java applications. To run Java applets, you can use the JDK Applet Viewer or any Java-compatible Web browser, such as the HotJava browser.

The "Hello World" Application is where you should start if you're interested in writing a standalone application -- a Java program that executes independently of any browser. This lesson also introduces some concepts that will help you understand any Java program: how to define a Java class and how to use supporting classes and objects.

The "Hello World" Applet is the place to start if you want to write an applet -- a Java program to be included in HTML pages and executed in a Java-compatible browser.

Common Compiler and Interpreter Problems (and Their Solutions) is the place to go if you have trouble compiling or running your first Java program.


Previous | Next | Trail Map | Getting Started | Table of Contents