Java Reference
In-Depth Information
versions not backward compatible. With the release of JDK 1.2, Sun started
referring to the language as Java 2, and the developer's kit is now called the
Standard Developer's Kit (SDK).
The SDK contains many tools for developing and running Java applications,
most importantly a compiler and JVM. The current version of the Java 2 SDK
is 1.4, but Sun updates Java 2 frequently; don't be surprised if you find ver-
sions 1.5 or beyond on Sun's Web site. No matter what the version is, the SDK
is free for developers to download and install.
The SDK can be found at http://java.sun.com/j2se. To download the SDK,
click the link for J2SE Downloads, and you will taken to the SDK download
page. This page has two columns for each platform: one for the JRE and one for
the SDK. JRE stands for Java Runtime Environment, which is what you would
download if you wanted to just run Java applications. The JRE is essentially
the JVM for your platform.
If you are actually going to write Java programs, which is what we are going
to do throughout this topic, you will need the SDK. The SDK contains the JRE
plus all the necessary development tools.
Click the SDK that's right for you. For example, if you are going to be using
Windows to write your Java programs, click the Windows SDK. Notice that
there are versions available for Linux and Solaris as well. You need to agree to
Sun's license agreement before downloading.
The SDK is a large download that will take more than an hour for those
with a dial-up connection.
Installing the SDK
After you have downloaded the installation file, execute it to install the SDK.
The downloaded file will be unpacked and Install Wizard will begin. You will
be prompted to accept Sun's license agreement; then you will be asked to
select the folder where the SDK is to be installed.
It is best to install the SDK in the default folder that the Install Wizard dis-
plays. For example, for SDK 1.4, the default folder is c:\j2sdk1.4.0. If you do
change the install folder, however, be sure not to pick a directory with spaces
in the directory name such as Program Files. Spaces in directory names tend to
cause problems with the compiler and JVM.
Figure 1.1 shows the step in the Install Wizard where you can choose which
components of the SDK to install. If you have plenty of hard drive space, you
might as well install all the components; however, if you want to save some
hard drive space, you can choose to not install the Native Interface Header
Files, Demos, and the Java Sources. These components will not be needed for
what we are going to be doing.
Search WWH ::




Custom Search