I have a filename named \"first.java\" saved on my desktop in notepad++. When I run the cmd command \"javac first.java\" it gives me this error.
javac: file
As KhAn SaAb has stated, you need to set your path.
But in order for your JDK to take advantage of tools such as Maven in the future, I would assign a JAVA_HOME path to point to your JDK folder and then just add the %JAVA_HOME%\bin directory to your PATH.
JAVA_HOME = "C:\Program Files\Java\jdk1.8.0"
PATH = %PATH%\%JAVA_HOME%\bin
In Windows:
blah;blah;blah;C:\Program Files\Java\jdk1.8.0\bin;blah,blah;blah
to:
blah;blah;blah;%JAVA_HOME%\bin;blah,blah;blah