Java is a widely used programming language expressly designed for use in the
distributed environment of the internet. Java can be used to create complete
applications that may run on a single computer or be distributed among servers
and clients in a network.
Downloading Oracle Java JDK
Downloading Oracle Java JDK
Download Java (JDK) source tarball files for your system
architecture by going to official (http://www.oracle.com/technetwork/java/javase/downloads)
page and kept on path/opt/ directory.
JDK: Java Development Kit. Includes a complete JRE plus tools for
developing, debugging, and monitoring Java applications.
Server JRE: Java Runtime Environment. For deploying Java
applications on servers. Includes tools for JVM monitoring and tools commonly
required for server applications.
In this tutorial we will be installing the JDK Java SE Development
Kit 8 x64 bits. Accept the license and copy the download link into your
clipboard. Remember to choose the right tar.gz (64 or 32 bits).
JDK: Java Development Kit. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
Server JRE: Java Runtime Environment. For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications.
In this tutorial we will be installing the JDK Java SE Development Kit 8 x64 bits. Accept the license and copy the download link into your clipboard. Remember to choose the right tar.gz (64 or 32 bits).
jdk-8u131-linux-i586.tar.gz [For 32-bit System]
jdk-8u131-linux-x64.tar.gz [For 64-bit System]
|
Note: Always get the latest version from Oracle's website
Installing Java
Unpack the compressed jdk (/opt/jdk-8u131-linux-x64.tar.gz) file
by using this command
# cd /opt
#
tar –xvzf jdk-8u131-linux-x64.tar.gz
|
Rename jdk-8u131 directory to jdk in /opt directory by using give command
# mv jdk-8u131 /opt/jdk
|
Setting up Java Environment Variables
First we need to set environment variable for java. Edit ~/.bashrc
file
# nano ~/.bashrc
|
Append following values at end of file and save the file.
export JAVA_HOME=/opt/jdk
export
PATH=$JAVA_HOME/bin:$PATH
|
Reload the configuration file ~/.bashrc with the following
command.
# source ~/.bashrc
|
Verify the Java version
# java -version
|
java version
"1.8.0_131"
Java(TM) SE Runtime Environment
(build 1.8.0_131-b13)
Java HotSpot(TM) 64-Bit Server
VM (build 25.131-b13, mixed mode)
|
0 comments:
Post a Comment