Geek Dashboard Home
  • News
  • Smartphones
    • Android
    • iOS
  • Computers
    • Windows
    • macOS
  • Internet
  • Reviews
  • Tools
    • Password Generator
    • iFrame Tester
Search Geek Dashboard
Home • Computer

How to Download Java for Windows 8 and Set Java Path

Amar Ilindra • Updated March 27, 2020 • 3 min read •

If you’re a programmer and using windows 8 operating system on your laptop or desktop or even if you just upgraded to windows 8 from windows 7 operating system then you must download java for windows 8 and to run java programs, you must set java path and class path in your windows 8 operating system. Before setting required paths in your windows 8 PC or laptop, you must download and install java for windows 8. Here is a detailed guide which helps you download and install java for windows 8 and next to setup java path and class path in few simple easy steps.

java for windows

Before setting java path and class path in java, one must know about what path exactly is? Path is an environmental variable which include the address of commands in java. whenever you write a command in command prompt, operating system looks for this path to execute those commands successfully.

Also Read: Best Windows 8 Tips and Tricks

Setting path is nothing but adding JDK bin directory to environment variable. JDK bin directory contains “java” and “javac” commands. javac command is used to compile java program and java command is used to run the compiled java program.

How to download java for windows 8 and install Java Development Kit (JDK)

Before setting java path and class path you must download java for windows 8. Here is a detailed tutorial to download and install Java Development Kit on windows 8 in few simple clicks.

Go with below link to download java for windows 8. Before downloading make sure you have selected correct file type including bit because 32-bit JDK may not work on 64-bit and vice versa.

Download Java for Windows 8

Once download completes, run it as administrator and follow on-screen instructions to complete installation.  It is recommend to install JDK in the same drive where operating system is being installed. In my case I installed in C drive.

How to set Java Path and Class Path in Java

Before setting java path in your system, let us make sure that path is not set earlier. Just press Ctrl+R and type cmd to open command prompt. In command prompt type javac and press enter.

javac error windows 8

If you see an error javac is not recognized as an internal or external command then it clearly says, java path is not set currently and we have to set the path.

Once you confirmed that path is not set, go to installation directory of JDK. Generally if you installed in C drive, it should look like this and Copy the entire address of that directory.

C:Program FilesJavajdk1.8.0bin

Now right click on my computer icon and select properties. From the left menu, click Advanced System Settings and then press Advanced in the popup windows displayed and ultimately click Environment Variables.

java path

Under User variables, select path and click on edit. Now add ; at the end of the path and paste the address copied earlier and add another ; then click Ok. Again click Ok to save all changes we just made.

set java path

That’s all we made all necessary things to set java path in windows 8. Now just go to cmd, then type javac and hit enter. If you see lots of commands rather than a error in single line, then you’re done perfectly fine.

javac

Make use of below sample problem to test whether your JDK is working fine or giving any errors on your machine.

class geek_dashboard
{
public static void main(String args[])
{
System.out.println("This tutorial is from Geek Dashboard");
}
}

In case if you face any difficulties while setting up path or while installing java for windows, let us know from comments section.

Computer java JDK Windows Windows 8

Be the Change!

Spread the word and help us create better tech content

Facebook Twitter Reddit WhatsApp Pinterest
Avatar for Amar Ilindra

Amar Ilindra

•
Facebook LinkedIn Instagram GitHub

Amar Ilindra is a tech-savvy individual who is passionate about gadgets and new technology. He is a full-stack developer who enjoys experimenting with technology and sharing his experiences through blogging. When he's not writing, he devotes his time to creating practical web and mobile applications for both Android and iOS platforms.

Read all 480 articles from Amar

Comments

  1. Avatar for MarcMarc says

    June 18, 2023 at 3:27 AM

    I read your instructions wrong and now I don’t remember what the original path was, because I just pasted the java path over the existing. I did that because when I did what you said to do nothing happened so I was like maybe I need to paste over. Now I have a mess.

Over 1,30,286+ Followers

Join now to get all latest updates from Geek Dashboard

Facebook Twitter Telegram Pinterest YouTube Instagram

Recently Published

  1. TAGRY X08 True Wireless Earbuds Review: Budget-Friendly Excellence with Long Battery Life
  2. Why Are Tech Lawsuits Becoming the New Normal in the US
  3. My Experience of Using TuneFab Amazon Video Downloader
  4. Wondershare Dr. Fone 13 Review - The Ultimate Mobile Toolkit for iOS and Android
  5. TOZO OpenEgo Review - Is It a Reliable and Practical Headphone?
  6. Samsung Lost its Crown as the Top Foldable Smartphone Seller Worldwide

Download the Apps Now

We put a lot of effort and resources in writing our articles, and we believe it is our responsibility to satisfy your tech hunger

Download Geek Dashboard Android App on Google PlayAndroid App onGoogle Play Download Geek Dashboard Extension on Chrome Web StoreBrowser Extension onChrome Web Store
Geek Dashboard Logo

Geek Dashboard brings you the latest and greatest in technology news, reviews, and how-to guides. From smartphones to laptops, drones to VR and everything in between, we've got you covered

Got a Tip? Write In? tip@geekdashboard.com

© 2012 - 2025 · Geek Dashboard, product of ikva eSolutions

  • Blog
  • Advertise
  • About
  • Jobs
  • Contact
  • Privacy Policy
  • Write For Us
  • T&C
  • Office Setup

No dogs were injured while working on this website because we love them