Step-by-Step:Downloading and Installing Java on Windows and Linux

Windows:

  1. Download the JDK (Java Development Kit):
    • Visit the Java SE Downloads page on the official Oracle website: Java SE Downloads.
    • Accept the terms of the license.
    • Click the download link after selecting the JDK version that works best for your Windows x64 or x86 system.
  2. Run the Installer:
    • Double-click the downloaded file (which is often a.exe file) to launch the installer after the download is finished.
  3. Follow the Installation Wizard:
    • You will be guided through the installation procedure by the installation wizard. Observe the directions displayed on screen.
    • Select the installation directory along with any other settings you wish to use.
    • To start the installation procedure, click either "Next" or "Install".
  4. Verify Installation:
    • Press the Windows key + R to launch Command Prompt after the installation is finished, then type "cmd" and hit Enter.
    • Enter 'java -version' after typing it. Information on the installed version of Java should be visible.

Linux:

  1. Install OpenJDK (Java Development Kit):
    • Most Linux distributions usually have OpenJDK accessible in their default repositories. Utilizing the package manager, you can install it.

    For Debian/Ubuntu:

    sql
    sudo apt update
    sudo apt install default-jdk
    

    For Fedora:

    sudo dnf install java-devel

    For CentOS/RHEL:

    sudo yum install java-devel
  2. Verify Installation:
    • Once the installation process is finished, launch a terminal.
    • Enter 'java -version' after typing it. Information on the installed version of Java should be visible.

Optional: (Windows only) Configure environment variables:

  • You might need to add the location where Java is installed to the 'PATH' environment variable in order to use Java from the command line. Usually, while installing Windows, this step is completed automatically. If not, manual labor can be used:
  • Choose "Properties" from the context menu when you right-click "This PC" or "My Computer".
  • From the list of options on the left, choose "Advanced system settings".
  • Select "Environment Variables" by clicking the button.
  • Locate and click "Edit" on the "Path" variable under "System Variables".
  • Include the path (for example, 'C:\Program Files\Java\jdk-15\bin') to the 'bin' directory of your JDK installation in the list of paths.
  • To save the modifications, click "OK".

That's it! Java is now installed successfully on your Linux or Windows computer. Now you can begin working on building

Post a Comment

Previous Post Next Post