Main Class com.google.appengine.tools.enhancer.Enhance not found - google-app-engine

I recently installed GPE for eclipse Luna 4.4. However, I have to use jre 1.6 instead of jre 1.7. After modifying the Build Path and changing the JRE 1.7 to JRE 1.6. I am getting an JVM error "Main Class com.google.appengine.tools.enhancer.Enhance not found". Does anyone know how to fix this issue?

The Google Plugin for Eclipse is compiled for Java 1.7. The byte code will not run in a Java 1.6 VM. If you really have to use Java 1.6, you cannot use the GPE.
As of two years ago, App Engine removed Java 6 support. It now only supports Java 7 (and Java 8 if it's set to compile for Java 7). So with or without the plugin, you need to upgrade to Java 7 if you're going to deploy and run your app on App Engine.

Related

Codename One - Eclipse Plugin

I get the following install error for the codename one eclips plugin.
Any suggestions on how to resolve this.
Cheers
Make sure you are using a version of Eclipse for Java developers. It seems the Java editor functionality isn't available in your copy of eclipse.
I recommend using a recent version of JDK 1.8 and a Eclipse Neon 2 or newer (e.g. Oxygen etc.).

Failed to initialize App Engine SDK 1.8.9

I am using Indigo on a Mac Pro (10.9.1). I updated to Java1.7 in order to run some updated Google Play Service samples. Under Installed JREs, JAVA7 is shown as the only and default choice, which points to the new Java path. But when I start Eclipse, it started complaining that "JRE version is 1.6.0; version 1.7.0 or later is needed to run Google plugin for Eclipse".
I tried to add the vm option in eclipse.ini, i.e. I added
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/home/bin/java
above "-vmargs" as described here: http://wiki.eclipse.org/Eclipse.ini.
It doesn't make any difference though. Since then, I have uninstalled GPE from Eclipse and installed them again via "install new software" from https://dl.google.com/eclipse/plugin/3.7. Still the same problem. Under Google->App Engine, there is an error message "Failed to initialize App Engine SDK (path)". This points to appengine-java-sdk-1.8.9.
I have checked my Java version using all means I am aware of, i.e. from run Java -version, using Java's control panel, output from code... They all show I am using Java 1.7.0.51.
Any help is appreciated!
Edit: Google has provided a solution that works great. Add this argument in eclipse.ini
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib
Make sure that eclipse Is compiling your project to 1.7 specifications. Even though you have 1.7 selected as your virtual machine, it might be compiling to 1.6. It's in the eclipse project settings

AppEngine SDK 1.8.5 and Eclipse Juno not working

I've installed the Eclipse plug-in for both GWT and Appengine on 3 different machines, all with Juno (4.2). In each case, I get the following error:
"The selected App Engine SDK is not valid: Failed to initialize App Engine SDK at (path)."
Reinstalling the SDK does not make any difference. Here is more info. about the different configurations I've tried:
Ubuntu 12.0.4, Java 7, Eclipse 4.2
Mac OSX 10.8.5, Java 7, Eclipse 4.2-32 bit
Mac OSX 10.8.5, Java 7, Eclipse 4.2-64 bit
Mac OSX 10.6.8, Java 6, Eclipse 4.2-64 bit
Any suggestions for what may be going wrong and configs I could try? Thanks!
I was getting the error "Failed to initialize App Engine SDK at '..path'" in Eclipse 4.3(Kepler) with Google App Engine SDK 1.8.5 and Java SDK 1.7.0_01
When I updated the Java SDK to 1.7.0_41 (latest one) this error disappeared.
Great relief!!
I can confirm that using win7/sun jdk1.6.0_45/eclipse 4.2/gae sdk 1.8.4 the error occurred when updating to 1.8.5+ and that updating the jre that eclipse runs in to sun 1.7.0_45 solved the issue.
I can now add gae SDKs above 1.8.4.
I'm not sure why we could'nt have an error modal in eclipse to that effect.
I found my issue was that I was trying to use the app engine plugin for eclipse 4.3. I just downloaded the new eclipse and it works now. Sorry, thats the best I have..
I had the same problem and Nicky Jaidev's post helped me.
I had to update the Java Sdk to 1.7.
But also you have to update the eclipse.ini:
-vm
C:/Program Files/Java/jdk1.7.0_45/bin/javaw.exe
If you don't change this, it will keep failing.
My guess is that the AppEngine SDK version is intended for other version of Eclipse.
For Eclipse 4.2 (Juno), use this link: https://dl.google.com/eclipse/plugin/4.2
Follow the installation guide here if you unsure about how to install plugins through Eclipse directly: https://developers.google.com/eclipse/docs/install-eclipse-4.2
I had the same issue with app engine plugin for Eclipse 4.2 (well, it was the Android Developer Tools version), on Mac
OS 10.8.4.
After I saw this warning about Java 6 not being supported, https://developers.google.com/appengine/docs/java/gettingstarted/installing, I upgraded to the latest version of Java 7 and it worked.

Google AppEngine gives Jersey ServletContainer ClassNotFoundException

I am using Eclipse Indigo with Google AppEngine SDK (and no GWT)
Project setup starting with a clean default project:
Java in use is the Oracle JDK 7 but changed project settings to generate 1.6 code and source code compatibility also set to 1.6
Added 2 external jars to BuildPath from Glassfish Java EE 6 + JDK 7 installation
jersey-core.jar
jersey-gf-server.jar
jersey-gf-server.jar contains com.sun.jersey.spi.container.servlet.ServletContainer
Fixed Eclipse markers complaining that the jar files would not be found in the deployed app -- accepted suggested fix for each to copy them to war/WEB-INF/lib folder
Deployed successfully
Upon accessing the regular non-Jersey hello-world servlet, I get the error in AppEngine logs: java.lang.ClassNotFoundException: com.sun.jersey.spi.provider.container.servlet.ServletContainer
the class ServletContainer is in the jersey-bundle.jar
You should add jersey-servlet.jar as well. At some point this class was migrated there.

Google App Engine on NetBeans 7

Is there any pluggin or alternative way to use Google App Engine on Netbeans 7?
deploy
code completion
...
I managed to get it to work with netbeans 7.0 by using the kenai plugin for Netbeans 6.9: http://kenai.com/downloads/nbappengine/NetBeans69/updates.xml.
Here you have the installation instructions. Of course: replace the links proposed with the link I provided (which is not listed on the page itself... Actually I found it by removing /Latest_NetBeans68/updates.xml from the other path).
I think it stopped working with 7.0.1 though.
A new plugin version for NetBeans 7.2 is available.
The settings file is located at
https://kenai.com/downloads/nbappengine/NetBeans7.2/updates.xml
Installation instructions (for older versions) are here.

Resources