How to set the environment variables for Java in Windows (the classpath)?
How to set the environment variables for Java in Windows (the classpath)?
Java path set for java 11
Don’t include the \bin folder, just the JDK path. For example
Correct – C:\Program Files\Java\jdk-11
Wrong – C:\Program Files\Java\jdk-11\bin
In environmental variable, user variable section click on New button and give path like below.

after that give ok for it and go to the System variables and select the Path and double click on it.
Your Keytools file sit under "Java/bin" folder so you need to either set Environment variable or go to "Java/bin" folder and run command
You can add JAVA_HOME in the system environment variable from my computer>>advance tab>add the new path as explained here.
It might help Mac and Linux users as well.