I've installed the latest Apple update for Java, here is what the terminal now says:
$ java -version
java version "1.8.0.0_25"
Java(TM) SE Runtime Environment (build 1.8.0.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
After that I still have the following result:
$ cordova build
Running command...
[Error: Failed to run "java - version ", make sure that you have a JDK installed.
You can get it from htpp://...
[Error: ERROR : build one of the platforms : Eroor:C:\User\HelloWorld\paltforms\android\cordova\build.bat:Command faild with exit code 2...]
Looking around there seems to be huge confusion on how to activate Java.
Do I now also need to download and install the Oracle Java package from the following link?link
Configure your .bash_profile file...
nano ~/.bash_profile
Adding is line:
export JAVA_HOME=$(/usr/libexec/java_home) export PATH=${JAVA_HOME}/bin:$PATH export PATH=/usr/local/bin:$PATH