To set JAVA_HOME, do the following: Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
Traditionally, JAVA_HOME is set to the JRE or SDK main directory.
To Solve ERROR: JAVA_HOME is set to an invalid directory Error Error Is saying that There is just no need to add bin into PATH variable. You need to set the JAVA_HOME like this. JAVA_HOME=”C:\Program Files\Java\jdk1. 8.0_131″ Just set JAVA_HOME like this and your error will be solved.
You should set it with C:\Program Files\Java\jdk1.8.0_12
.
\bin
is not required.
JAVA_HOME
should point to the home jdk directory, and not to jdk/bin
directory.
You need to set the JAVA_HOME
like this:
JAVA_HOME="C:\Program Files\Java\jdk1.8.0_131"
Remove the \bin
, and also remove the ;
at the end. After restart the cmd and run.
Try the following:
\bin
from JAVA_HOME
path.On Window 10, the problem was with the semicolon ;
.
Go to edit the system environment variables
and delete the semicolon at the end of JAVA_HOME
value C:\Program Files\Java\jdk1.8.0_144
In other words, convert this C:\Program Files\Java\jdk1.8.0_12;
to C:\Program Files\Java\jdk1.8.0_12
You might have to delete your entry in the Windows Dialog and create a new one. If you ever had multiple entries and get the bigger Form view, Windows automatically inserts a ;
at the end of each entry, even if you only have one entry left.
JAVA_HOME should be C:\Program Files\Java\jdk1.8.0_172
don't include semi-colon(;) or bin in path. Any jdk version above 7 will work. Also, you need to re-start the cmd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With