3

I'm trying to deploy a Google App Engine project with the help of Eclipse Luna 4.4, but whenever I go to "Deploy to App Engine" I get the following error message:

------------ Deploying frontend ------------

Preparing to deploy: Created staging directory at: 'C:\Users\ [[USERNAME]]~1\AppData\Local\Temp\appcfg6715651699721496450.tmp' java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: C:\Users\ [[USERNAME]]\ ..HEALTH APP\Api\war\WEB-INF\classes\com\example\mycompany\myapplication\api\buses\BusEventSingleton.class

Debugging information may be found in C:\Users\ [[USERNAME]]\AppData\Local\Temp\appengine-deploy4610763336673097422.log

But in Project right click -> Properties I can see how the Java Compiler level is 1.7:

Java Compiler level is 1.7

and how the Project Facets also establishes Java version as 1.7:

Java version as 1.7

So anyone knows why I get this message? What is being compiled with Java 8 and how can I change it?

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
zulu
  • 31
  • 4
  • At the bottom of your first screenshot there is a warning that you need to have a 1.7 "compatible" JRE installed and activated (currently 1.8). Maybe the secret lies there? – Eric Simonton Jul 19 '16 at 16:36

2 Answers2

1

Changing the JDK compliance fixed the issue for me.
You can change the compiler compliance level by going to the Java Compiler page as shown in the steps below.

  1. In the Project Explorer view, right-click on the project and then select Properties.
  2. Select the Java Compiler page in the Properties window.
  3. In the JDK Compliance section, select the desired Compiler compliance level. (JDK 7)
  4. Click Apply and then Ok. See this
Tony Vincent
  • 13,354
  • 7
  • 49
  • 68
  • The problem is JDK Compliance level is already at 1.7, as it is seen in the image of the first link I posted. – zulu Jul 19 '16 at 10:03
0

You may try this also

In the Project Explorer view, right-click on the project and then select Properties. Select the Java Build Path page in the Properties window. Go to Libraries Tab, click JRE System Library. If the JRE is (JRE 8 or JRE 1.8), then edit select Execution Environment is 1.7.

Press Finish.

Remember to press Apply, in the Java Build Path Page. Then OK.

Try a clean build

Prakash Ayappan
  • 455
  • 2
  • 8