GAE开始使用Java,Eclipse Indigo - 无法编译为1.6 [英] GAE getting started in Java, Eclipse Indigo - can't compile as 1.6

查看:473
本文介绍了GAE开始使用Java,Eclipse Indigo - 无法编译为1.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得我和这个人一起进行交流。我遵循Google App Engine入门指南( https://developers.google。 com / appengine / docs / java / gettingstarted / ),一切顺利,直到我上传到App Engine。



我收到500个错误,所以我检查了日志,发现:guestbook / SignGuestbookServlet:不支持的major.minor版本51.0]



然后我搜索这个问题(当然stackoverflow),并找到这个解决方案: Google App Engine和Java Version?



所以我将合规级别设置为1.6,然后在对话框的底部我得到警告当选择1.6合规性时,确保已安装并激活兼容的JRE(目前为1.7)。



我快乐点击确定,并提示重建。重建后,我会得到这个新错误:Java编译器级别与安装的Java项目方面的版本不匹配。



没有明知地使用项目我搜索一些帮助(再次在stackoverflow),并找到:Faceted Project Prblem(Java Version Mismatch)错误消息



不幸的是,由于我没有使用Maven,而且当我提出项目的属性时,没有任何帮助项目属性 - > Project Facets面板让我改变一个版本。



所以似乎我被卡住了一些无法在Eclipse中编译或者无法部署的东西到App Engine。我知道我可能在这里遗漏了一些明显的东西,但是我不能把我的手指放在上面。



更新:我已经卸载了所有JRE和JDK,只重新安装jdk1.6.0_32。问题继续完全一样。

解决方案

我也有同样的问题。我可以通过使用导航器视图和编辑.settings / org.eclipse.wst.common.project.facet.core.xml来解决问题,改为:

 <?xml version =1.0encoding =UTF-8?> 
< faceted-project>
< installed facet =javaversion =1.6/>
< / faceted-project>

此更改后,错误消失,我可以使用jre1成功运行DevMode中的GWT项目。 7但是java 1.6合规级别。



真的好像应该有一种方法可以通过项目配置编辑这个java facet,但是我在Juno找不到它。 / p>

I feel like I keep going in circles with this one. I followed the Getting Started guide for Google App Engine (https://developers.google.com/appengine/docs/java/gettingstarted/) in Eclipse and everything went relatively well until I uploaded it to the App Engine.

I was getting 500 errors so I checked the logs and found this: "guestbook/SignGuestbookServlet : Unsupported major.minor version 51.0]"

I then search for this problem (on stackoverflow, of course) and found this solution: Google App Engine and Java Version?

So I set the compliance level to 1.6 and then at the bottom of the dialog I get the warning that "When selecting 1.6 compliance, make sure to have a compatible JRE installed and activated (currently 1.7)".

I happy click OK, and it prompts for a rebuild. After the rebuild I then get this new error: "Java compiler level does not match the version of the installed Java project facet."

Not having knowingly used any facets in the project I do a search for some help (again on stackoverflow) and find this: "Faceted Project Prblem (Java Version Mismatch)" error message

Unfortunately it is not even close to being helpful because I am not used Maven, and when I bring up the properties of the project there is no Project Properties -> Project Facets panel for me to change a version on.

So it seems that I am stuck with something that either cannot be compiled in Eclipse or cannot be deployed to App Engine. I know that I am probably missing something obvious here but I can't quite put my finger on it.

UPDATE: I have uninstalled all JREs and JDKs, and reinstalled only jdk1.6.0_32. The problem continues exactly the same.

解决方案

I had the same problem. I was able to resolve by using the Navigator view and editing the .settings/org.eclipse.wst.common.project.facet.core.xml, changing to:

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <installed facet="java" version="1.6"/>
</faceted-project>

After this change, the error went away and I could successfully run the GWT project in DevMode using jre1.7 but java 1.6 compliance level.

It really seems there should be a way to edit this java facet via project configuration, but I couldn't find it in Juno.

这篇关于GAE开始使用Java,Eclipse Indigo - 无法编译为1.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆