2

I am trying to deploy a basically empty project to GAE through Intellij IDEA. I have created a new project, set my project ID in appengine-web.xml and left everything else as is. I get the following error, with the full log here.

java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: org/eclipse/jetty/apache/jsp/JettyJasperInitializer$1.class in C:\Users\Tony\.m2\repository\com\google\appengine\appengine-java-sdk\1.9.48\appengine-java-sdk\appengine-java-sdk-1.9.48\jetty93\jetty-distribution\lib\apache-jsp\org.eclipse.jetty.apache-jsp-9.3.14.v20161028-nolog.jar

I have tried installing JDK 7, setting everything to use that, used JDK 8 compiling in 1.7 and 1.8, nothing seems to work.

  • Possible duplicate of [When deploying GAE I get "IllegalArgumentException: Class file is Java 8 but max supported is Java 7", but I'm using Java 7 everywhere](http://stackoverflow.com/questions/38454380/when-deploying-gae-i-get-illegalargumentexception-class-file-is-java-8-but-max) – Dan Cornilescu Dec 22 '16 at 05:09
  • Check your **Project Facets(Project Properties->Project Facets)**, if Java version is 1.8 change it to 1.7 as Google App Engine does not support JDK 8 yet. – Parag Jadhav Jan 09 '17 at 06:10

3 Answers3

2

I ran also in the exact same error and solved it with downgrading the Google Appengine SDK from 1.9.48 to 1.9.46.

So with Intellij IDEA 2016.3.2 running with Java 8 (set Environment Variable IDEA_JDK_64 = jdk1.8.0_xx) and Project Java SDK set to 1.7 and Google Cloud SDK set via Environment Variable to GOOGLE_CLOUD_HOME = google-cloud-sdk-138.0.0-windows-x86_64.

I'm now able to deploy into to Google Cloud with out "...Class file is Java 8 but max supported is Java 7: org/eclipse/jetty/apache/jsp/JettyJasperInitializer$1.class ..."

Dev Moerker
  • 111
  • 6
2

There is a need just specify java version that should be used for executing GAE application.

This could be done via modifying appengine-web.xml file in your GAE project. Check <runtime> tag from the below sample:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>your-app</application>
    <version>1</version>
    <threadsafe>true</threadsafe>
    <runtime>java8</runtime>
</appengine-web-app>
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Vasyl Shyrochuk
  • 460
  • 3
  • 11
1
I have tried installing JDK 7, setting everything to use that

maven is still using java 8

NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/14669534) – CocoNess Dec 22 '16 at 06:00
  • @CocoNess it does answer the question, hence it being accepted. – NimChimpsky Dec 22 '16 at 08:26
  • @CocoNess This pointed me in the correct direction of fixing my pom and telling maven to compile in 1.7. So this is the answer, at least for me in my situation. – Tony Pappas Dec 22 '16 at 19:04