I am trying to setup Cordova for running cordova-android9.0. My problem is that when I downgraded my java version, it no longer works.
I downloaded Java 8 and set my environment variables to:
User variable Path to:
C:\Program Files\Java\jdk1.8.0_351\bin
and Gradle to this version:
C:\Gradle\gradle-4.10.3\bin
(recommended by Cordova)
System variables:
JAVA_HOME C:\Program Files\Java\jdk1.8.0_351
and Path the same as on user variables
When I run java -version
in terminal it gives me error message:
Error occurred during initialization of VM
Failed setting boot class path.
I cannot figure out why Java is not responding correctly
Not sure what could be breaking, but you can try clean installing java from your system once. Uninstall all java versions -> reboot pc -> re-install correct JDK 8 from here: https://www.oracle.com/in/java/technologies/javase/javase8-archive-downloads.html and afterwards try to set the JAVA_HOME if not set properly.