I'm trying to make my first app using Phonegap and I got this while running in command

C:\USERS\KTR\DESKTOP\PHONEGAP\LIB\ANDROID\BIN>create C:\Users\KTR\Desktop\Demoap p com.example.Demoapp Demoapp The JAVA_HOME environment variable is not set. Set JAVA_HOME to an existing JRE directory. Remember to also add JAVA_HOME to the PATH variable. After updating system variables, open a new command window and retry. 

Any help would be greatly appreciated Thank you

2

2 Answers

You have to do two things to get it fixed.

Firstly go to My Computer right click open properties and open Advanced System Setting and then open Environment variables. Open the Path variable and insert a semicolon at the end and add the path of your bin folder of your jdk it will be something like C:/Program Files/Java/ Jdk X.Y/bin save and close it.

Secondly create a new system variable named JAVA_HOME and in its value write C:/Program Files/ Java/ Jdk X.Y save and close and now retry by writing the create command

P.S find the version number go to your java folder and copy those version number hopefully this will help

You need Java on your computer. See how to install and configure java

Hope this will help

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy