I\'m getting this error when trying to deploy to Google AppEngine. I DO have JDK selected!
------------ Deploying frontend ------------
Preparing to deploy:
Go to Eclipse folder where you have eclipse installed (say c:\eclipse). You will find eclipse.ini file which eclipse uses to while starting. Add the following line -vm C:\Program Files\Java\jdk1.7.0_25\bin\javaw.exe
change the above java path with your location of JDK. It should be able to use this JDK and will compile and deploy to app engine.
I see that the OP is using Google Plugin for Eclipse (GPE), which is deprecated, but this was once also a problem in Cloud Tools for Eclipse (CT4E), so I'll leave a relevant answer for CT4E here for reference.
It was indeed a bug of Cloud Tools for Eclipse that it did not use the JDK configured for a project but instead used the JDK used to launch Eclipse for staging. The bug has been fixed: https://github.com/GoogleCloudPlatform/google-cloud-eclipse/issues/2195.
So, others answers in this question to edit eclipse.ini
to change the JDK to launch Eclipse are a temporary workaround that is no longer needed. Just update to the latest CT4E version and set a JDK for a project. You can specify whatever JDK/JRE necessary in eclipse.ini
for launching Eclipse.
WOW!!! I was dealing with this issue for like 3-4 hours. Was just about to comment saying fuck this. But then I changed the eclipse.ini to:
-vm
A:/Programming/Java/jdk1.8.0_73/bin/javaw.exe
instead of:
-vm
A:/Programming/Java/jdk1.7.0_79/bin/javaw.exe
AND SUCCESS!
Why this might have worked? Not really sure. I needed 1.7 not 1.8... but 1.7 kept pointing to a JRE instead of the JDK... And surprisingly 1.8 didn't do that + still worked with the current build. Also worth mentioning to specify 1.7 in facets /build path & compiler..
In my case I was trying to File>Restart
the Eclipse but not working when exited and run again It works