|Start of Tutorial||
The lessons in this trail give a quick introduction to Java programming. They tell you what Java is and provide you with an opportunity to compile and run some simple Java programs. Finally, they give you the background knowledge you need to understand how the programs work.
The Java Phenomenon lesson talks a bit about the Java language and platform. Its aim is to give you an idea of what Java can do for you. It also covers some basic Java concepts that will help you understand the process of writing a Java program. If you can't wait to write your first program, skip ahead to one of the following two lessons.
Having Trouble Getting Started? Try the detailed instructions in Your First Cup of Java: for Microsoft Windows, for UNIX, or for Mac OS.
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 2 Platform. The Java 2 SDK, Standard Edition 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 Applet Viewer (included in the SDK) or any Java-compatible Web browser, such as the HotJava browser.
The "Hello World" Application leads you through compiling and running a standalone application-- a Java program that executes independently of a browser. The lesson also introduces some general Java techniques: how to define a class and how to use supporting classes and objects.
The "Hello World" Applet tells you how to compile and run an applet--a Java program to be included in HTML pages and executed in Java-enabled browsers. The lesson also introduces some general Java concepts and techniques: how to create a subclass, what packages are, and how to import classes and packages into a program.
Common Compiler and Interpreter Problems (and Their Solutions) is the place to go if you have trouble compiling or running the programs in this trail.
|Start of Tutorial||
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.