• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
AgileTeach

AgileTeach

FIND YOUR DREAM JOB WITH US

  • Home
  • About
    • FAQ’s
    • Terms & Conditions
    • Privacy Policy
  • Training
    • QA Software Testing
    • Business Analysis (BA)
    • Automation Testing with Java
    • AWS Solution Architect
    • Cyber Security
    • QA Automation Testing with Python and Selenium
  • Schedule
  • Career Service
  • Contact
  • Blog
  • Student Portal

Install java in Windows and MacOS

Java is one of the most widely used programming languages in the world. It’s used to develop everything from mobile apps to enterprise-level software. If you’re looking to learn Java or develop Java applications, the first step is to install the Java Development Kit (JDK) on your computer. In this post, we’ll walk you through the steps to install Java on your machine.

Step 1: Check if Java is already installed on your computer

Before installing Java, it’s a good idea to check if it’s already installed on your computer. To do this, open the command prompt (Windows) or terminal (macOS or Linux) and type “java -version”. If Java is already installed, you’ll see the version number displayed. If not, you’ll get an error message.

Step 2: Download the Java Development Kit (JDK)

To download the JDK, go to the Java SE Downloads page on the Oracle website. Make sure to select the version of Java that’s compatible with your operating system. For example, if you’re using Windows 10, you’ll need to download the Windows x64 installer.

Step 3: Install the JDK

Once you’ve downloaded the JDK installer, double-click on the file to start the installation process. Follow the prompts to complete the installation. Make sure to accept the license agreement and choose the default installation settings unless you have a specific reason to change them.

Step 4: Set the PATH environment variable

After installing the JDK, you need to set the PATH environment variable. This tells your computer where to find the Java compiler and other Java tools. To set the PATH variable, follow these steps:

  1. Open the Terminal app.
  2. Type “nano ~/.bash_profile” and press Enter.
  3. In the Nano editor, add the following line to the bottom of the file: “export PATH=/Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home/bin:$PATH” (replace “jdk1.8.0_261” with the version number of the JDK you installed).
  4. Press Ctrl + X, then Y, then Enter to save the file and exit Nano.
  5. Type “source ~/.bash_profile” and press Enter to reload the configuration.

Step 5: Verify the installation

To verify that Java is installed correctly, open the command prompt (Windows) or terminal (macOS or Linux) and type “java -version” again. You should now see the version number displayed without any error messages.

Congratulations, you’ve successfully installed Java on your computer! Now you’re ready to start learning Java or developing Java applications. Good luck!

Ready to start your first project?

Start by doing what’s necessary, then do what’s possible.

Register Now

Agile1Tech

Certified to Operate by the State Council of Higher Education For Virginia.

571 645 5899

info@agile1tech.com

Sitemap

  • Home
  • About
  • FAQ
  • blog
  • Contact

Useful Links

  • Schedule
  • Career Service
  • Student Portal
  • Admin
  • Test Environment

Newsletter

Get the latest news, events and announcements straight to your inbox.

Join Newsletter

  • Facebook

Call 480 341 0432 for support

Copyright © 2025 · agile1tech All Rights Reserved

Website developed and Designed by Md Nazmul Shakir Rabbi.