Oracle Java tutorials are a good starting point to go through when beginning to learn Java. Refer https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#BABGDJFH which explains how to set up the PATH
"Updating the PATH Environment Variable
To set the PATH variable permanently, add the full path of the jdk1.8.0\bin directory to the PATH variable. Typically, this full path looks something like C:\Program Files\Java\jdk1.8.0\bin.
Also , refer http://docs.oracle.com/javase/tutorial/getStarted/problems/index.html which points to some common problems while setting up a working environment with JDK.
"Common Error Messages on Microsoft Windows Systems
'javac' is not recognized as an internal or external command, operable program or batch file
If you receive this error, Windows cannot find the compiler (javac).
Here's one way to tell Windows where to find javac. Suppose you installed the JDK in C:\jdk1.8.0. At the prompt you would type the following command and press Enter:
C:\jdk1.8.0\bin\javac HelloWorldApp.java
If you choose this option, you'll have to precede your javac and java commands with C:\jdk1.8.0\bin\ each time you compile or run a program. To avoid this extra typing, consult the section Updating the PATH variable in the JDK 8 installation instructions."