Wednesday, January 20, 2010

Installing the Java SDK

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 installer’s 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

No comments:

Post a Comment