简体   繁体   中英

Google App Engine and Java Version?

I have jre 7 installed and jdk 6u29. I can't install jre6 because an old version of it is stopping the install, I've tried removing all traces of it but it still telling me an old version is installed.

My question is can I develop for GoogleApp engine with jdk6 and jre7 combination? I keep getting error in my logs that indicate the class was compiled with the wrong version java?

Well, on GAE's page it doesn't say anything specific about JDk7, but I think that's just because the page hasn't been updated in a while. I can tell you that i do infact use JDK 7 with GAE (have done so for months) and everything's fine.

Normally the JRE doesn't enter in this equation, as running the GAE locally will still make use of the same JDK you use for dev. However if you indeed would manually try to run a JDK7 compiled class using JRE6 this would not work, but again, I don't think this is an issue in your context.

you can change your compiler version in eclipse using following steps

  1. Right click on project and take properties
  2. Change java compiler to the desired version

Make sure Your

  • java Build Path (right click on you project > properties > Java Build Path > Libraries )
  • Java compiler (right click on you project > Properties > Java Compiler )

are point to same java version.

The easiest way to make it same is change the Project Facets

right click on you project > properties > Java (select the correct java version)

如果你的类是用旧版本的Java编译的(这里我的意思是JDK)你可以在新的java VM上运行这些类(这里我的意思是JRE),所以,你可以回答,但这是一些奇怪的情况......

如果您使用Android Studio(1.3)开发Google AppEngine应用程序,请不要使用Oracle的JDK 1.8作为Java工具,您应该使用JDK 1.7。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM