In this tutorial, we are going to learn on how to install JDK on Linux Operating system.
Let`s download JDK from here. Look for the very first link and click Download JDK.
Select the operating system, for which you want to install JDK, In this tutorial, we are learning on how to install jdk on linux operating system, I have selected "Linux" as operating system.
Select the checkbox to agree with the license terms, then click continue to proceed with the download.
Before the final page for download, you need to create an account with oracle.
A prompt will open which will ask you to Save the file. Save this file under (C:\jdk\linux) folder).
Once the file is copied to the folder. You need to remote copy the file to the Linux server. There are many tools available to ftp the file. I use winscp, here is the complete guide on how to install and use the winscp on your system.
Installation:
Once the file is copied on the Linux server (example: /usr/java).
JDK Installation Steps on Linux Operating System:
1. Change the file permission as follows.
chmod a+x jdk-xx-xxx.bin
2. Run the bin file to start the installation../jdk-xx-xxx.bin
Unpacking...
Checksumming...
Extracting...
...
...
A directory will be created under "/usr/java" with the JDK version name, which will consists of all the jdk files.3. You can export the Java home to create it as an environment variable.
export JAVA_HOME=/usr/java/jdk1.6.x_xx
export PATH=$JAVA_HOME/bin:$PATH
4. you can verify the JDK version installed on your system by issuing the following command.which java
Output:/usr/java/jdk1.6.x_xx/bin/java
java -version
Output:java version "1.6.x_xx"
Java(TM) SE Runtime Environment (build 1.6.x_xx-bxx)
Java HotSpot(TM) 32-Bit Server VM (build 11.0-bxx, mixed mode)
5. Installation Completed