Basically, there are two ways to set the path of Java:
In able to set the temporary one we need to open cmd, and then, type set path=C:\Program Files\Java\jdk1.8.0_121\bin then type javac.
For Permanent, follow these steps:
1. On this pic, go to properties.
2. Go for Advanced.
3. Then, click on Environment Variables.
4. After that, click on the new tab in the user variable.
5. After that, type the path in the Variable name and then copy and paste the bin folder path.
6. Then click OK.
I hope this will help.
Want to become a Java expert? Join Java Course now!!
Want to know more about Java? Watch this video on Java Tutorial for Beginners | Java Programming: