

This error message make user confuse, the success screen as below. You may choose to uninstall other versions if no other application is using different version of java. PATH variable should also contain above path and importantly before any (if there are any) other path of if JDK/JRE already mentioned in the PATH variable. JAVA_HOME=C:Program FilesJavajdk1.8.0_152 then 1.8 in this case) are accessible from PATH environment variable and JAVA_HOME. Just make sure that same JDK versions(i.e. In Linux (Debian/Ubuntu) this can be solved by selecting a Java 1.8 SDK in sudo update-alternatives -config javacĬhanging JAVA_HOME env variable directly does not seem to have any effect.ĮDIT: responding to the comments: This probably has something to do with the fact that new Debian (and apparently Ubuntu) Java installations through the package manager do not use the JAVA_HOME enviroment variable to determine the location of the JRE. I dicovered that my path environmental variable was pointing to java 1.7 while JAVA_HOME was pointing to 1.8, so i edited the path variable to 1.8 and i was fine.

I just renamed older JDK folder with _, just in case if I need it further, and it worked. When i wrote where java in cmd it outputted C:Program Files (x86)Javajdk1.7.0_55 along side with java.exe path,i’ve changed the JAVA_HOME variable from environment variables to C:Program FilesJavajdk1.8.0_20 & it worked, so it seems i had 2 jdk instances & cordova needs the v1.8.* one. In my case JAVA_HOME was pointing to C:Program Files (x86)Javajdk1.7.0_55 Removing the older version JDK path from 'path‘ environmental variable did the trick for me. I faced the same issue and noticed that both new version of JDK and older version JDK path has been mentioned in 'path‘ environmental variable. Uninstalling older versions of JDK would have worked.

The Java Home variable is setted correctly to the JDK path, but I don’t know why I am getting this issue. I am using Cordova 6.4.0 in Windows 7 OS, but I get this error once I tried to build the android version :
