My compiler swears on your code, in particular on your quotes. Below code is:
package Main; public class Main { public static void main(String[] args) { System.out.println("Hello word"); } }
PATH variable (Windows)
Windows 10 and Windows 8
In the "Search" line, perform a search:
System (Control Panel)
Click on the link
Additional system parameters
Click
Environment Variables
In the Environment Variables section, select the environment variable.
PATH
Click Edit. If the PATH variable does not exist, click Create. In the Change system variable (or New system variable) window, specify the value of the PATH environment variable ( ;C:\Program Files\Java\jdk1.8.0_121\bin\ ). Click OK. Close all other open windows by clicking OK. Reopen the command window and execute the java code.
Windows 7
On the desktop, right-click on the icon.
Computer
In the context menu, select
Properties
. Click on the link
Additional system parameters
Click
Environment Variables
In the Environment Variables section, select the environment variable.
PATH
Click
Change
If the PATH variable does not exist, click Create. In the Change system variable (or New system variable) window, specify the value of the PATH environment variable ( ;C:\Program Files\Java\jdk1.8.0_121\bin\ ). Click OK. Close all other open windows by clicking OK. Reopen the command window and execute the java code.
Compiling a java file: the file name should be the same as the class name, i.e. Main.java. Further, after installing the PATH: 
in my case it will appear next to the Main.java file, the file Main.class (compiled)