Articles → DEVOPS → Install Java On The Linux Machine

Install Java On The Linux Machine

Type Of Operating System

  1. Connect to the Linux machine using the MobaXTerm.
  2. Write the following command.
  3. uname -i

Download The Setup

  1. Go to the URL -
  2. Go to the section "Java SE Development Kit 8u271" and download the .rpm file according to the operating system.
  3. Picture showing the list of java packages for different operating system

    Click to Enlarge

  4. A pop-up window will come to accept terms and conditions.
  5. Picture showing the terms and conditions when user downloads the java package for a specific operating system

    Click to Enlarge

  6. Once you click on the button "Download JDK-8u271-linux-x64.rpm", the page will be redirected to the login screen.
  7. Picture showing the Oracle account login screen

    Click to Enlarge

  8. Enter the valid username and password and click on the "Sign In" button. Create an account if you do not have the existing account.
  9. Once your credentials are authenticated, the setup file will be downloaded.

Install Java

  1. Open WinSCP.
  2. Connect to the linux server.
  3. Transfer the file "JDK-8u271-linux-x64.rpm" from your local machine to the Linux server.
  4. Open MobaXTerm and connect to the server.
  5. Switch the user using the sudo -i command.
  6. Run the following command.
  7. rpm -ivh /home/karan/jdk-8u271-linux-x64.rpm

    Picture showing the command prompt for installing java on the linux machine

    Click to Enlarge

    Install using the .tar file

    tar -xvf /home/karan/jdk-8u271-linux-x64.tar.gz

Posted By  -  Karan Gupta
Posted On  -  Thursday, November 19, 2020


Your Email Id  
Query/FeedbackCharacters remaining 250