Java is installed on windows 10 machine but not working java compiler in any path dir and getting below error when running javac command.
First check the java installed directory whether javac.exe file is located under 'jdk\bin' directory.
If not found javac.exe file, need to install the java properly on windows 10 machine.
If javac.exe file is found then try to configure java jdk\bin location directory path in environment path variable to use javac command in any path directory.
1. Go to control panel.
2. Click on System and Security.
3. Go to System.
4. Go to Advanced System Settings.
5. Click on Environment variable in Advanced System Settings.
6. Select path Environment variable, edit the path variable and add new path directory where javac.exe file is located 'jdk/bin' directory.
Save the updated path variable and apply the settings.
7. Once done open the command prompt again on windows 10 machine and run the javac command and check whether working or not. output like below will be appeared if javac command working fine.
This is the common steps to update environment variables on windows 10 for any application requires.