How to set path in Java

To compile and execute the any java file it is necessary to set the path of JDK.

Let's follow below guidelines which helps you to set the JDK path, follow these steps:

1. Right click on This PC select properties -> select advanced tab ->select environment variables ->select new tab of user variable -> variable name as path -> value as path from java bin folder-> ok -> ok -> ok

1) Go to MyComputer properties

2) Click on the advanced tab

3) Click on environment variables

4) Click on the new tab of user variables

5) Write the path in the variable name

6) Copy the path of bin folder

7) Paste path of bin folder in the variable value

8) Click on ok button

9) Click on ok button