Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run my cordova command But I am facing following error ERROR: JAVA_HOME is set to an invalid directory in Java. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How This Error Occurs ?
I am trying to run my cordova command But I am facing following error.
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_ 131\bin;
How To Solve ERROR: JAVA_HOME is set to an invalid directory Error ?
How To Solve ERROR: JAVA_HOME is set to an invalid directory Error ?
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.
ERROR: JAVA_HOME is set to an invalid 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.
Solution 1: set the JAVA_HOME like this
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.
Solution 2: Remove the \bin
- Remove the
\bin
from PATH variable. - also remove the
;
at the end - After restart the cmd and run again.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
Thanks you so much!, you saved my day!!! 😀
It’s my Pleasure to Help You JayUpperPie. Thank You For Your Valuable words.