How to install java
tar package in Linux
1.Download the java tar package from official openjdk website. If you want other version visit website.
Link: https://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
2. Create a directory in which want to install or specify if already available.
3. Move the java tar file to desire location.
4. Untar the file on the same location.
5. Define and attach /bin directory to desire path. Two ways we can define PATH.
· Add below in ~/.bashrc for individual user
Desire path: JAVA_HOME
Path: Attached the /bin directory to desire path because it contain all binary files.
· Add below in /etc/profile for All users available in the server
6. Apply the changes by running below command.
7. Verify the version
==============================================================Finished================================================================
Thank you for reaching out the page, hope this sufficed your requirements and resolved your issue.
====================================================================================================================================