Install Java for Linux

Ensure you have the root user access. You can do this by running the command “su” and entering the superuser password.

  1. Switch to the root user.
  2. From a command prompt, navigate to the directory from which you downloaded the RPM file.
  3. Install the required package using the following command:
    rpm -ivh jdk-17_linux-x64_bin.rpm

    This image shows the command prompt window.
  4. Verify you have JDK17 as the default version for Java.

    This image shows the command prompt window.
  5. Delete the .rpm file if you need to save disk space.