Java Reference
In-Depth Information
Sun also makes a robust graphical development environment for Java called
Java Studio. Sun makes several versions of this tool and distributes the NetBeans edi-
tion of the product for free. Finally, the CD contains the Eclipse open source IDE.
Learning how to use a new development environment can be a difficult step in
moving from COBOL to Java. These initial exercises are geared more toward help-
ing you become familiar with a new environment than reviewing the concepts al-
ready discussed. After you've mastered (or at least come to terms with) the
development environment, you'll use these exercises to review the concepts pre-
sented. Therefore, you'll begin by concentrating on learning the development en-
vironment instead of understanding the code samples. (The code samples are
explained and reviewed later.) To help you get started, step-by-step introductions
to the SDK for the Java 1.6 platform are presented.
Commands that you are expected to execute (either with a mouse or by typing
the command) are identified with the arrowhead marker at the beginning of the
command.
G ETTING S TARTED WITH J AVA ' S SDK
Sun's product has good introductory documentation available for it. An excellent
one is on Sun's Java Web site. The following steps will guide you through the
process of creating your first Sun-flavored Java application and applet.
First, install the SDK development environment. You can download it from the
CD-ROM included with this topic or from Sun's Web site. Follow the instructions
on the installation Web page to install the software properly.
After it has been installed on your PC, the SDK utilities can be used from an
MS-DOS command window. You can start up an MS-DOS window by using this
menu path, beginning with the Windows task bar: Start > Run, then type in CMD .
In the command window, you can execute the Java compiler (javac.exe), the
Java runtime (java.exe), and the applet viewer (appletviewer.exe). All these pro-
grams take parameters, such as the name of the Java file to be compiled. If you are
using a Windows version before XP, you should also install the DosKey program
(type doskey in the command window). This program remembers your DOS com-
mands, which you can recall and edit using the cursor keys.
If the system cannot find the java.exe program after installation, you may need
to add the directory that contains the SDK executables to your PATH environment
variable. This variable controls how Windows finds programs to execute.
Search WWH ::




Custom Search