JAVA_HOME is set to an invalid directory:

We Are Going To Discuss About JAVA_HOME is set to an invalid directory:. So lets Start this Java Article.

JAVA_HOME is set to an invalid directory:

  1. JAVA_HOME is set to an invalid directory:

    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"

  2. JAVA_HOME is set to an invalid directory:

    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"

Solution 1

You should set it with C:\Program Files\Java\jdk1.8.0_12.

\bin is not required.

Original Author Sagar Gangwal Of This Content

Solution 2

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"

Original Author Kiran Choudhary Of This Content

Solution 3

Remove the \bin, and also remove the ; at the end. After restart the cmd and run.

Original Author Akshay Of This Content

Solution 4

Try the following:

  • Remove \bin from JAVA_HOME path.
  • Open new command line window.
  • Run your command as an administrator.

Original Author Abdulrahman Hashem Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment