I'm trying to run phonegame on Windows 8 and I get the following error when I type phonegap run android. Any ideas how to solve it? I have everything ready, nodejs, cordova and etc.
C:\Users\almeidamarcell\my-app>phonegap run android [phonegap] detecting Android SDK environment... [phonegap] using the local environment [phonegap] adding the Android platform... [error] An error occured during creation of android sub-project.
C:\Users\almeidamarcell.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q. js:126 throw e; ^ Error: Failed to run 'java -version', make sure your java environment is set up including JDK and JRE. Your JAVA_HOME variable is undefined Error: Command failed: 'java' is not recognized as an internal or external comma nd,
operable program or batch file.
at C:\Users\almeidamarcell\.cordova\lib\android\cordova\3.3.0\bin\lib\check_
reqs.js:62:22 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Socket. (child_process.js:956:11) at Socket.EventEmitter.emit (events.js:95:17) at Pipe.close (net.js:465:12)
C:\Users\almeidamarcell\my-app>phonegap run android