I know this is a popular question on the web, but I'm getting this error even after setting JAVA_HOME
env variable and adding %JAVA_HOME%\bin\
to the Path variable.
I'm trying to use PDF Presenter app which requires Java. So, I downloaded Oracle JDK (jdk-14.0.1_windows-x64_bin.exe) and installed it and then configured the above two variables.
If I enter %JAVA_HOME%\bin\java.exe --version
, it works fine. But if I enter java.exe
or java
, I get the error in the title. How can I fix this?
Here is the output of echo %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;%JAVA_HOME%\bin\;C:\Users\Nagabhushan\AppData\Local\Microsoft\WindowsApps;
PATH
variable. Also make sure to restart your CMD after doing any changes toPATH
. – Iindenecho %PATH%
->C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;%JAVA_HOME%\bin\;C:\Users\Nagabhushan\AppData\Local\Microsoft\WindowsApps;
– Domineering