Run the downloaded SDK executable file and, when prompted,
either accept the default installation path or enter a location where
the Java files are to be installed, such as C:\Java.
The installers Custom Setup dialog box will then offer a choice of
components that may be installed. Only the Development Tools
component is essential to start programming with this book so all
other components may be excluded from the installation to save
disk space.
Demos may be installed if disk space permits and are useful to
demonstrate some aspects of Java in action.
Source files are merely used to create the Java language.
Following component selection the installation will automatically
complete with all the necessary Java class libraries and tools being
installed at the chosen location.
Start out by
installing just the
minimum options
to avoid
confusion.
1. Introducing Java 11
The tools to compile and run Java programs are normally operated
from a Command Prompt, such as C:\>. They are located in the
bin folder of the Java installation directory and can be made
available from anywhere on the computer by adding their location
to the system path.
On Windows XP navigate through Start > Control Panel >
System then click the Advanced tab and click the Environment
Variables button. In the Environment Variables dialog select the
System Variable named Path, then click the Edit button. Add the
address of the Java bin directory to the end of the list in the
Variable Value field. For instance, add C:\Java\bin; if you chose to
install the SDK at C:\Java.
Click on the OK buttons to close the Environment Variables dialog
then reboot the system to apply the new Path setting.
To test that the Java tools are now globally accessible open a
Command Prompt window and type java -version at the prompt.
The SDK should respond with version information like this:
On older versions
of Windows the
SDK can be
made globally
available by
editing the autoexec.bat file to
add the location of the Java tools
at the end of the SET PATH line.
If Java responds with a Bad command or file name message this
means that the command was mis-typed or the system cannot find
the files that are needed to run Java programs.
Check the Path settings given in the instructions above then reboot
the system and retry the test.
When Java responds to the java -version command correctly the
system is ready to start writing Java programs.
…cont’d
Wednesday, January 20, 2010
Introduction
The Java programming language was first developed in 1990 by an
engineer at Sun Microsystems named James Gosling.
He was unhappy using the C++ programming language so he
created a new language that he called Oak, after the oak tree that
he could see from his office window.
As the popularity of the World Wide Web grew Sun recognized
that Goslings language could be developed to run applications on a
web page.
The language was renamed Java, simply because the name
sounded cool, and was made freely available by Sun in 1995.
Developers around the world quickly adopted this exciting new
language and, because of its modular design, began to create new
features that could be added to the core language.
Many of these additional features were incorporated into Java
when it was updated in 1998 and renamed Java 2.
Subsequent updates have enhanced some multimedia features and
added support for the Linux operating system.
The essence of Java is a library of files called classes that each
contain small pieces of ready-made proven code.
Any of these classes can be added into a new program, like bricks in
a wall, so that only a relatively small amount of new code ever
needs to be written.
This saves the program author a vast amount of time and largely
explains the huge popularity of Java programming.
Also this modular arrangement makes it much easier to identify
any errors than would a single large program.
This book demonstrates a first simple Java program over the next
few pages before explaining, by example, the basic mechanics of
the Java language.
After developing an understanding of the Java language the
remaining chapters give full examples of how to incorporate many
of the ready-made classes into new Java programs.
In order to create any Java program the Java class libraries need to
be available on the local computer system. These are all contained
in a freely available package called the Java 2 SDK (Software
Development Kit) that also includes all the tools needed to build
and run Java programs.
The Java programs in this book use version 1.4.2 of the Java 2 SDK
Standard Edition that can be downloaded from Sun Microsystems
website at http://java.sun.com.
The Java 2 SDK Standard Edition is suitable for computers
running on Microsoft Windows 95, 98, Me, NT, 2000 and XP.
Separate versions of the SDK are available for computers running
on Linux or Solaris operating systems.
Selecting the installation link for your platform starts the Java 2
SDK installation this may take some time, depending on the
speed of your connection. Full documentation for the Java 2 SDK
is available as a separate download. This is not initially required for
the examples given in this book and may be downloaded later after
you have become more familiar with Java.
engineer at Sun Microsystems named James Gosling.
created a new language that he called Oak, after the oak tree that
he could see from his office window.
As the popularity of the World Wide Web grew Sun recognized
that Goslings language could be developed to run applications on a
web page.
The language was renamed Java, simply because the name
sounded cool, and was made freely available by Sun in 1995.
Developers around the world quickly adopted this exciting new
language and, because of its modular design, began to create new
features that could be added to the core language.
Many of these additional features were incorporated into Java
when it was updated in 1998 and renamed Java 2.
Subsequent updates have enhanced some multimedia features and
added support for the Linux operating system.
The essence of Java is a library of files called classes that each
contain small pieces of ready-made proven code.
Any of these classes can be added into a new program, like bricks in
a wall, so that only a relatively small amount of new code ever
needs to be written.
This saves the program author a vast amount of time and largely
explains the huge popularity of Java programming.
Also this modular arrangement makes it much easier to identify
any errors than would a single large program.
This book demonstrates a first simple Java program over the next
few pages before explaining, by example, the basic mechanics of
the Java language.
After developing an understanding of the Java language the
remaining chapters give full examples of how to incorporate many
of the ready-made classes into new Java programs.
be available on the local computer system. These are all contained
in a freely available package called the Java 2 SDK (Software
Development Kit) that also includes all the tools needed to build
and run Java programs.
The Java programs in this book use version 1.4.2 of the Java 2 SDK
Standard Edition that can be downloaded from Sun Microsystems
website at http://java.sun.com.
The Java 2 SDK Standard Edition is suitable for computers
running on Microsoft Windows 95, 98, Me, NT, 2000 and XP.
Separate versions of the SDK are available for computers running
on Linux or Solaris operating systems.
Selecting the installation link for your platform starts the Java 2
SDK installation this may take some time, depending on the
speed of your connection. Full documentation for the Java 2 SDK
is available as a separate download. This is not initially required for
the examples given in this book and may be downloaded later after
you have become more familiar with Java.
Subscribe to:
Comments (Atom)
