Java 8 support in GWT

This seems like a very simple question, but I searched high and low and almost never mentioned it. So, I will ask him here.

What is the current plan for supporting the new Java 8 language constructs in GWT?

Also, what subset of the proposed Java 8 libraries are planned for client-side emulation? Stream API? New Date / Time API?

Finally, where are the discussions on this important topic discussed? I am sure that many of us are willing to participate and possibly contribute to this effort.

Beta versions of Java 8 have been around for a long time, and there are many articles that discuss proposed APIs. It is assumed that it will be connected later this year, so it seems that the last time, at least, it was necessary to discuss how and when the so desired language features will be introduced into the GWT.

My apologies if this question is answered somewhere else, or if I missed some important information related to this. This would be a great place to link to such information, even if it was answered. Thank!

+45
java-8 gwt
Mar 28 '13 at 22:18
source share
2 answers

Time to update the answer.

UPDATE (October 2017)

GWT 2.8.2 is available here . Release Notes .

UPDATE (June 2017)

The official GWT 2.8.1 download .

Release notes for 2.8.1

UPDATE (October 2016)

GWT 2.8.0 is finally here!

The GWT team has released the 2.8.0 tag on Github . The official GWT website has not yet been updated, but the request for transferring changes to the GWT website is also ready for viewing . So very soon the compiled version will be available for download!

Available for download

UPDATE (September 2016)

Meanwhile, the GWT team noted GWT 2.8.0 RC3 on the GitHub mirror.

The GWT team (Daniel Kurka) released the version of GWT 2.8.0 (RC2) here .

Release Notes are available for 2.8.0 (RC2):

Bug fixes

  • Correct the incorrect warning about the inability to use.
  • Fix a problem when restarting the server server (Jetty).
  • Fix a problem in super-dev mode with changing compiler options without causing a complete recompilation.
  • Missing command line options added to DevMode entry point
  • Fixed performance regression in String.

RC1 release notes are available on the official website . Here are the most important changes in Java 8 support in the upcoming GWT 2.8.0:

The main

  • Partial support for the standard Java 8 APIs (see full list).
  • Fix memory leak using Java 8 compilation.
  • The source level is set to Java 8.
  • Static and standard methods in the interfaces arent visible to the generators. If you want to take advantage of Java-8isms, you are encouraged to switch to the annotation processor. This can break an existing assembly if the interface is changed to turn a method other than the default method into the default method.

JDK 8 emulation support

  • Emulation java.io.UncheckedIOException.
  • Emulation Optional and its int, long, double options.
  • Emulate Objects.requireNonNull () with a vendor message.
  • Fixed emulation behavior Math.min / max (float / double).
  • Emulation Character.isBmpCodePoint ().
  • Emulation of CharSequence.chars ().
  • Emulating java.lang.SecurityException.
  • Java 8 API emulation
    • java.util.Arrays,
    • java.util.ArrayDeque,
    • java.math.BigInteger,
    • java.util.BitSet,
    • java.util.Comparator,
    • java.util.function,
    • java.util.Iterator,
    • java.lang.Iterable,
    • java.util.IntSummaryStatistics / LongSummaryStatistics / DoubleSummaryStatistics
    • java.util.Collection / lists / Queues,
    • java.util.Map,
    • java.util.logging.Logger,
    • java.util.PrimitiveIterator,
    • java.util.Spliterator,
    • java.util.stream,
    • java.util.StringJoiner

GWT 2.8.0 RC2 still has some problems that the GWT team is expected to fix in the near future. The final release should appear soon ("as soon as it is ready").

+9
Sep 10 '16 at 19:48
source share

EDIT GWT 2.8.0 was released on October 20, 2016 with support for Java-language constructs (lambdas, method references) and emulation of some Java 8 APIs (mainly threads)

EDIT As of April 2014, GWT 2.6 supports Java 7, and work is currently underway to support Java 8 in GWT 2.7, due to be released in the summer of 2014. GWT 2.7 will most likely only support Java 8 language constructs, but will not emulate any new API (streams, javax.time, etc.).




The plan is to support Java 7 first: https://github.com/gwtproject/gwt/labels/java7

This includes updating the JDT, and it worked (or, alternatively, completely switch to something else; suggested by JetBrains using their parser, which already supports Java 8, but GWT also needs a compiler, and I don't know what exactly they provide). The next steps are to map the new language constructs to JavaScript (actuating the string-in-switch, as they can be directly mapped to JavaScript without hashCode based descriptions, which will be executed by the Java compiler).

While GWT uses the JDT to parse / compile Java, Java 8 can only be supported with JDT support (at an acceptable level that AFAICT does not already have).

+46
Mar 28 '13 at 22:49
source share



All Articles