How to Download and Install Java for a 64-bit Machine?


Java is one of the most popular and widely used programming languages. Java is known for its portability, flexibility, and extensive ecosystem of libraries and frameworks. It is often used for developing a wide range of applications, including web applications, mobile apps, desktop software, and even embedded systems.
In this article, we’ll see through the process of downloading and installing the Java Development Kit (JDK) for a 64-bit system on Windows, macOS, and Linux. Java is a versatile programming language, and having the correct version installed is crucial for running Java applications or developing software in Java.
Prerequisites:
A 64-bit computer running Windows, macOS, or Linux.
Internet connection to download Java.
Administrative privileges on your machine.
Step 1: Download the Java JDK
For Windows:
Visit the Oracle JDK download page: Go to the official Java downloads page by visiting https://www.oracle.com/in/java/technologies/downloads/
Select the JDK Version:
- Scroll down to find the JDK section and click on the version you want to download (e.g., JDK 21).
Choose the 64-bit version:
Under "JDK Download", you'll see multiple options. For a 64-bit Windows machine, select the Windows x64 installer (either
.exe
or.zip
).Click Download.
Accept the License Agreement:
On the Oracle website, you will need to accept the Oracle license agreement if asked.
For macOS:
Under "JDK Download", choose macOS and select the appropriate version (e.g., macOS x64).
Download the
.dmg
file.
For Linux:
Visit Oracle's JDK download page.
Scroll to "JDK Download" and find the section for Linux.
Choose the tar.gz archive for your distribution (usually 64-bit).
Step 2: Install the JDK
For Windows:
Run the Installer:
- Once the
.exe
file is downloaded, we will double-click on it to start the installation process.
- Once the
Follow the Installation Wizard:
We will click Next through the setup screens.
We can choose the installation path. We may leave the default (usually
C:\Program Files\Java\{jdk-version
}) or select a custom location.
Complete the Installation:
- We will click Next and then Install. The JDK will be installed on the system.
Once the installation is complete, we will click Finish.
Step 3: Verify the Installation
After installing Java, it is essential for us to confirm that it is installed correctly.
For Windows:
We will open Command Prompt (press
Windows + R
, typecmd
, and press Enter).We will type the following command to check the Java version:
java -version
We should see the installed Java version displayed, e.g.:
j Java version "21.0.5" 2024-10-15 LTS J Java(TM) SE Runtime Environment (build 21.0.5+9-LTS-239) J Java HotSpot(TM) 64-Bit Server VM (build 21.0.5+9-LTS-239, mixed mode, sharing)
Step 4: Set Java as the Default (if necessary)
For Windows:
Go to the Search box and type Advanced System settings in it. Now click on the View Advanced System settings..
Select the Advanced tab and then we will click on Environment Variables.
Under System Variables, we will find
Path
, then click Edit.We will add the JDK's
bin
directory to the Path variable. It will look like:C:\Program Files\Java\jdk-<version>\bin
We will click OK and Apply the changes.
Conclusion:
Now that we have successfully downloaded and installed Java on our 64-bit machine, we can start developing Java applications or running Java programs. It is important for us to keep our Java version updated for security and performance improvements.
Let me know if we encounter any issues during installation!
Subscribe to my newsletter
Read articles from Anurag directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
