I know there are a million topics about this, but none of them have resolved my issue. I recently removed jdk9 and replaced it with jdk1.8.0_161. Now I can't use the command line anymore to run my programs. What I did: I changed classpath in the System variables (Windows 10), both for user variables and system variables. Since that didn't help I started researching this and followed the steps, so I also added JAVA_HOME in the user variables and system, variables, but I keep getting the 'javac is not recognized as an internal or external command' error. Any ideas what else I can try?
Java classpath is where Java looks for Java files. But it seems that you have a problem with windows path variable, because javac itself is not found.
At the bottom of your picture is path variable. You should add the directory path that you mentioned to that variable. Also check if javac.exe is actually in that directory.
It has been a while but if I remeber correctly, the javac.exe file is in the /bin subdirectory.