Is Java 8 compatible with GWT 2.6 or 2.7? [duplicate]

一曲冷凌霜 提交于 2019-12-21 14:11:14

问题


I have an application which is developed using GWT 2.6 and Java 7. Now I am updating it to Java 8 with GWT 2.6.

  1. Is GWT 2.6 compatible with Java 8? Will it build/compile fine?
  2. Is GWT 2.7 compatible with Java 8? Any suggestion?

回答1:


If you're only interested in using a JDK 8 to compile your application, without using Java 8 language constructs, then GWT 2.6 and 2.7 will work.

Java 8 as a source language won't be supported before GWT 2.8 though, as already pointed by others.




回答2:


In 2.7, you can use the Java7 syntax on the client. You cannot use the Java8 syntax and runtime on the client.

On the server, you can use JDK8.




回答3:


Java 8 support should come in GWT 2.8 according to this post: Java 8 support in GWT.

So, basically you cannot use Java 8 in GWT 2.6. As I understand there are some improvements in 2.7, but it is not enough. There is a way that by dividing the project you can achieve that you can use Java 8 on the server side and java 7 with GWT on UI.




回答4:


It's seems to be GWT 2.8 and 3.0.

In the meantime, GWT 2.8 is due out within three months. Its main feature is support for Java 8, including lambdas.

http://www.infoworld.com/article/2874861/application-development/google-web-toolkit-major-upgrades-no-backward-compatibility.html




回答5:


Edit: you should take a look at this Java 8 support in GWT




回答6:


According to Release Notes for 2.8.0

Highlights

  • Java 8 syntax supported.
  • JsInterop has graduated from experimental. See final JsInterop specification.
  • GSS is no longer considered as experimental and old CssResource is now deprecated.

http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0_BETA1

Update: Stable version of 2.8.0 is released on Oct 20, 2016



来源:https://stackoverflow.com/questions/29913237/is-java-8-compatible-with-gwt-2-6-or-2-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!