Search code examples
visual-studiovisual-studio-cordova

Visual Studio Cordova Java Version Error


enter image description here

What I did I could not get rid of this error. Please help me. Thanks.


Solution

  • Instead of setting JAVA_HOME to JRE folder, you need to set it to your JDK folder. Generally, the JDK folder is under the same root folder of JRE:

    enter image description here

    To change the folder path of JAVA_HOME, you can change the value of JAVA_HOME under VS->Tools->Options->Tools for Apache Cordova->Environment Variable Overrides.