About this task
The PATH environment variable enables AIX to find programs
and utilities, such as javac, java,
and javadoc tool from any current directory. Changing
the path will override any existing Java launchers
in your path.
To display the current value of your
PATH environment
variable, type the following at a command prompt:
echo $PATH
To add the Java launchers to your path:
- Edit the shell startup file in your home directory. The name of
your startup file will depend on the shell you are using; for example:
- The Korn shell startup file is .kshrc.
- The C shell startup file is .cshrc.
- The Bourne shell startup file is .profile.
- The BASH shell startup file is .bashrc.
Add the absolute paths to the PATH environment
variable; for example:export PATH=/usr/java-ppc64-60-srt/jre/bin:/usr/java-ppc64-60-srt/bin:$PATH
- Log on again or run the updated shell script to activate the new PATH environment
variable.
Results
After setting the path, you can run a tool by typing the tool
command name at a command prompt from any directory. For example,
to compile the file
Myfile.Java, type:
javac Myfile.Java