Lambda expressions don't work in Java 8?

后端 未结 2 1992
礼貌的吻别
礼貌的吻别 2020-12-17 14:59

I have a virtual machine running Windows XP SP3 32-bit. On this machine I installed the Java SE JDK 8 build b44 Developer Preview from here.

I also installed the Jav

相关标签:
2条回答
  • 2020-12-17 15:25

    You need to download the binaries which contain the Lambda expressions feature. Try downloading from here http://jdk8.java.net/lambda/. I remember reading in the mailing list that the lambda expression branch is being merged in the main JDK8 build, but not sure if its been done. But I use the build from the Lambda project page.

    0 讨论(0)
  • 2020-12-17 15:28

    As an alternative to the http://jdk8.java.net/lambda/ releases, there are also JDK8 and JRE8 snapshot releases available in dmg, exe installer and tar.gz form from http://jdk8.java.net/download.html.

    These jdk8 developer snapshots also now include lambda (and javafx8) functionality. As of this writing, both lambda and javafx for jdk8 are still in feature and bug fix development mode.

    I have found the http://jdk8.java.net/download.html weekly builds useful and useable for development (programs using them will occasionally crash on my mac, so it's definitely not something you would want to deploy to production even if the oracle license for the builds permitted that, which they don't).

    If you want the absolute latest bleeding edge or customized jdk builds, you can build your own using obuildfactory. Such builds use an OpenJDK licensing model rather than an Oracle JDK licensing model, which may be preferable for some development projects, though, personally, I stick with Oracle JDK builds when I can.

    0 讨论(0)
提交回复
热议问题