Easy Steps to Set Path of Java in Windows 8


All students who want to start programming in java programming language and have theoretical knowledge about java programming language but they want to do coding practically on computer system a thing comes in the middle is how to set path for java in windows environment variable because many tutors says first of all you have to set path of java into your system.

ENVIRONMENT VARIABLE, it is the variable having value of path from where operating system running on the computer system will look up for any executable files.

So here in this post I’m gonna tell you what are the steps to set path for java in windows 8 i.e. the path where all executables of java language are residing we will set that path as a value to environment variable.

When a beginner starts coding in java programming language has to set this path for running various common operations in command prompt while executing any java written program. Such as: javac, java, javap etc.

First of all, to start setting path of java in environment variable we have to install java JDK (JAVA DEVELOPMENT KIT) into our system as per (64-bit or 32-bit).

JAVA DEVELOPMENT KIT is the collection of java run time environment, various jars, many packages and classes.

NOTE:  Without JDK your java program will not run on your system.

I’m giving these steps of setting path especially for windows 8 because very popular or say usable operating system all around the world is windows 8.


Note: Open up command prompt in your system and type javac if you got result like below it    means your path for java is not set.

java path-java path not set result

  • Search in window for “Edit environment variables for your account” (Settings) and after opening it a window will open up like below

java path-environment variable window

  • In this window click new button then a new dialog will show two text fields variable name and variable value enter path in variable name and in variable value we have to enter a path of bin folder that is in jdk folder where java is installed in your system. And It looks like below screenshot.

java path-environment variable details entered

  • After entering these values click OK button and again click OK button to save environment variable.
  • Now open up command prompt and insert javac command press enter you will not see any internal command type error means your path for java has been set.

Now you can easily run your java programming language written program in your system by typing javac for compilation directly and java command for interpreting or running your class.

If you found any mistake or have any queries please write down in comments I will appreciate them.

You Might Also Like


If you have any questions or suggestions, you are free to ask, i will appreciate that and, i will try my best...

Check Out