When you type a command in a terminal window, the shell,
a program that reads what you typed and tries to respond appropriately,
must first locate the command program on your file system. The shell
looks for commands in a list of directories stored in an environment
variable named $PATH. To see what is currently listed in the path,
This returns a colon-separated list of directories that should
look something like this:
The goal is to add the path to the AIR SDK bin directory to the
list so that the shell can find the ADT and ADL tools. Assuming
that you have put the AIR SDK at /Users/fred/SDKs/AIR,
then the following command will add the necessary directories to
Note: If your path contains blank space characters, escape them
with a backslash, as in the following:
/Users/fred\ jones/SDKs/AIR\ 2.5\ SDK/bin
You can use the echo command again to make sure
So far so good. You should now be able to type the following
commands and get an encouraging response:
If you modified your $PATH variable correctly, the command should
report the version of ADT.
There is still one problem, however; the next time you fire up
a new terminal window, you will notice that the new entries in the
path are no longer there. The command to set the path must be run
every time you start a new terminal.
A common solution to this problem is to add the command to one
of the start-up scripts used by your shell. On Mac OS, you can create
the file, .bash_profile, in the ~/username directory and it will
be run every time you open a new terminal window. On Ubuntu, the
start-up script run when you launch a new terminal window is .bashrc.
Other Linux distributions and shell programs have similar conventions.
To add the command to the shell start-up script:
Change to your home directory:
Create the shell configuration profile (if necessary) and
redirect the text you type to the end of the file with “cat >>”.
Use the appropriate file for your operating system and shell. You
can use .bash_profile on Mac OS and .bashrc on
Ubuntu, for example.
cat >> .bash_profile
Type the text to add to the file:
End the text redirection by pressing CTRL-SHIFT-D on
Display the file to make sure everything is okay:
Open a new terminal window to check the path:
path additions should be listed.
If you later create a new version of one of the SDKs into different
directory, be sure to update the path command in the configuration
file. Otherwise, the shell will continue to use the old version.