Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When deploying GAE I get "IllegalArgumentException: Class file is Java 8 but max supported is Java 7", but I'm using Java 7 everywhere

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?

like image 262
zulu Avatar asked Feb 11 '26 23:02

zulu


1 Answers

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
like image 147
Tony Vincent Avatar answered Feb 14 '26 15:02

Tony Vincent



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!