GWT 中的 Java 8 支持 [英] Java 8 support in GWT

查看:19
本文介绍了GWT 中的 Java 8 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个非常基本的问题,但我搜索了很多地方,几乎没有发现任何地方提到它.所以,我会在这里问.

This seems like a very basic question, but I searched high and low and have found almost no mention of it anywhere. So, I'll ask it here here.

在 GWT 中支持 Java 8 的新语言结构的当前计划是什么?

此外,提议的 Java 8 库的哪些子集将用于客户端仿真?流 API?新的日期/时间 API?

In addition, what subset of the proposed Java 8 libraries are slated for client-side emulation? The Stream API? The new Date/Time API?

最后,关于这个重要话题的讨论在哪里进行?我相信我们中的许多人都愿意参与这项工作,并有可能为此做出贡献.

And finally, where are the discussions relating this important topic taking place? I'm sure there are many of us who would like to participate in, and potentially contribute to, the effort.

Java 8 测试版已经存在一段时间了,并且有很多文章讨论了提议的 API.它应该会在今年晚些时候相关联,所以至少讨论这些备受期待的语言特性将如何以及何时进入 GWT 的时间似乎已经过去了.

The Java 8 betas have been around for a while now, and there are numerous articles discussing the proposed APIs. It is supposed to be related later this year, so it seems past time to at least be discussing how and when the much-desired language features will make their way into GWT.

如果在其他地方回答了这个问题,或者如果我错过了一些与之相关的重要信息,我深表歉意.这将是一个链接到此类信息的好地方,即使它已被回答.谢谢!

My apologies if this question is answered somewhere else, or if I missed some important piece of information related to it. This would be a great place to have a link to such information, even if it has been answered. Thanks!

推荐答案

是时候更新答案了.

更新(2020 年 5 月 13 日)

GWT 2.9.0 终于来了.发行说明

  • 能够使用 jsinterop-base 1.0.0、elemental2 1.0.0 和 jsinterop-annotations 2.0.0 编译项目.除了@JsAsync 和@JsEnum 之外,这使得 GWT2 在这些工具之间与 J2CL 兼容.
  • 添加了对 Java 语言级别 9、10 和 11 的支持.
  • 官方不再支持在 Java 7 上运行 GWT 编译器或服务器端工具.对于此版本,GWT 发行版仍被编译为在 Java 7 上运行,但不保证这是否会起作用.未来的版本将为 Java 8+ 编译字节码.该版本经过测试,发现在与 Java 8、11 和 14 一起运行时可以跨平台工作.

更新(2017 年 10 月)

GWT 2.8.2 此处提供.发行说明.

更新(2017 年 6 月)

官方 GWT 2.8.1 下载 位置.

2.8.1 发行说明

更新(2016 年 10 月)

GWT 2.8.0 终于来了!

GWT 团队已在 Github 上发布了 2.8.0 标签.GWT 官方网站尚未更新,但 GWT 网站上更改的拉取请求是 准备就绪并处于审核过程中.所以很快编译版本就可以下载了!

The GWT team has released the 2.8.0 tag on Github. The official GWT website has not been updated yet, but a pull request for the changes on GWT's website is ready and in review process. So very very soon the compiled version will be available for download!

可供下载

更新(2016 年 9 月)

与此同时,团队 GWT 已标记 GWT 2.8.0 RC3 在 GitHub 镜像上.

Meanwhile, team GWT has tagged GWT 2.8.0 RC3 on GitHub mirror.

GWT 团队 (Daniel Kurka) 发布了 GWT 2.8.0 (RC2) 版本 这里.

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

发行说明适用于 2.8.0 (RC2):

The release notes are available for 2.8.0 (RC2):

错误修复

  • 修复不正确的 unusable-by-js 警告.
  • 修复有关 DevMode 服务器(码头)重启的问题.
  • 修复了在超级开发模式下更改编译器选项不会触发完全重新编译的问题.
  • 向 DevMode 入口点添加了缺失的命令行参数
  • 修复了 String 中的性能回归问题.

RC1 的发行说明可在官方网站上获得.以下是即将发布的 GWT 2.8.0 中有关 Java 8 支持的最重要更改:

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

亮点

  • 部分支持 Java 8 标准库 API(完整列表见下文).
  • 使用 Java 8 编译修复内存泄漏.
  • 源代码级别设置为 Java 8.
  • 接口中的静态和默认方法对生成器不可见.如果您想利用这些 Java-8ism,我们鼓励您切换到注解处理器.如果更改接口以将非默认方法转换为默认方法,这可能会破坏现有构建.

JDK 8 仿真支持

  • 模拟 java.io.UncheckedIOException.
  • 模拟 Optional 及其 int、long、double 变体.
  • 使用消息供应商模拟 Objects.requireNonNull().
  • 修复 Math.min/max(float/double) 仿真行为.
  • 模拟 Character.isBmpCodePoint().
  • 模拟 CharSequence.chars().
  • 模拟 java.lang.SecurityException.
  • 模拟 Java 8 API
    • 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 仍然存在一些问题,预计 GWT 团队将很快修复这些问题.最终版本应该很快就会发布(一旦准备好").

    The GWT 2.8.0 RC2 still has some issues, which the GWT team is expected to fix soon. The final release should be coming out soon ("as soon as it is ready").

    这篇关于GWT 中的 Java 8 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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