This page includes the following topics:
tar zxvf jdk-8u101-linux-x64.tar.gz
jdk-8u101-windows-x64.exe
to install Java SDK 8.The purpose of setting operating system environment variables is so that the Java SDK is available to run from anywhere in the system. |
The JAVA_HOME and PATH environment variables are set in /etc/profile. You may need to create the variables, or modify them if they already exist. |
To set the environmental variables in Linux, follow these steps:
As the root user, enter the following in the /etc/profile file. A PATH variable should already be created in this file, so be sure to define the JAVA_HOME and export before the PATH export. Replace <some_path>
with the correct path fragment for Java installations.
export JAVA_HOME=<some_path>/jdk1.8.0_101 export PATH=$JAVA_HOME/bin:$PATH |
Log out and log back in so that the system recognizes your changes.
To verify that environment variables have been set correctly, follow these steps:
echo $JAVA_HOME
java -version
from a command prompt. You should see java version "1.8.0_101"
.Set the JAVA_HOME and PATH environment variables in system properties. |
To set the environmental variables in Windows, follow these steps:
JAVA_HOME.
C:\ProgramFiles\Java\jdk1.8.0_101)
|In the Variable value text box, prepend the following text in front of the text that already exists in the Variable Value field and click OK.
%JAVA_HOME%\bin; |
To verify that the environment variables have been set correctly, follow these steps:
echo %JAVA_HOME%
java -version
from a command prompt. You should see java version "1.8.0_101"
.tar zxvf apache-ant-1.8.4-bin.tar.gz
The purpose of setting operating system environment variables is so that the Ant build tool is available to run from anywhere in the system. |
The ANT_HOME and PATH environment variables are set in /etc/profile. You may need to create the variables or modify them if they already exist. |
To set the environmental variables in Linux, follow these steps:
export ANT_HOME=<some_path>/apache-ant-1.8.4
export PATH=$ANT_HOME/bin:$PATH
To verify that environment variables have been set correctly, follow these steps:
echo $ANT_HOME
ant -version
from a command prompt. You should see: Apache Ant version 1.8.4 compiled on December 13 2006.
The ANT_HOME and PATH environment variables are set in system properties. |
To set the environmental variables in Windows, follow these steps:
ANT_HOME.
C:\ProgramFiles\apache-ant-1.8.4)
.%ANT_HOME%\bin;
To verify that the environment variables have been set correctly, follow these steps:
echo %ANT_HOME%
Apache Ant(TM) version 1.8.4 compiled on May 22 2012.