I have recently uninstalled JDK 11 and installed JDK 8. For confirmation, I want to check which JDK is installed on my Windows 10
you might need to add path
in environment variables which you can find in Control Panel
open the Jdk where you installed and add until /bin
in the path in environment variables.
Add until /bin
in path variable in System Variables which is residing in Environment Variables.
Then do
java -version
which might show up.
If still problem persists, try restarting your pc and see.