Environmental variables are used by the operating system to save
settings (default values, locations of resources) to be used by Windows
or by processes launched by users.
There are two types of environmental variables:
- user variables that are specific to a particular Windows user account;
- system variables are always visible, regardless of the used user account.
Even if these variables are usually defined and initialized
automatically when you install the system or other applications, there
are situations in which the user must manually define them to put at the
disposal of applications.
The considered scenario is to set environment variables to enable the
compilation and execution of Java applications from the command line
(command prompt) or by using an IDE like Eclipse. By installing the Java
SDK, system variables about the location of executables (compiler, java
virtual machine) are not defined or initialized automatically.
Testing is done by opening command prompt
(Start -> cmd) and trying to launch the compiler with the command