BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Oracle Releases Java 8 at EclipseCon

Oracle Releases Java 8 at EclipseCon

Leia em Português

Lire ce contenu en français

Bookmarks

Today at EclipseCon, Oracle announced the general availability of Java 8, the first major upgrade in over two years. Downloads are available for Linux and Windows as 32- or 64-bit packages, along with Mac OSX and Solaris 64-bit packages. There is also a package specifically for ARM (compiled for the Hard Float ABI) which can be used on Raspbian and other Raspberry Pi platforms.

Java 8 ships with a number of improvements and new features. These changes include:

  • Lambdas provide a means to pass functions as data. With implicit casting to Single Abstract Method types (such as Runnable) it will dramatically simplify code that needs to pass filters and other predicates as data. (Note that the reason they are called lambdas is that Java has had closures in the form of inner classes since Java 1.1; what some incorrectly refer to as closures are really talking lambdas.) An example of a lambda is x -> x +1.
  • Method References allow a static method to be referred to as a function that can be passed into a function. An example would be Integer::parseInt, which could be mapped to a collection of Strings to produce a collection of Integers.
  • Streams which provide lazy iteration of values, either from a collection, from an infinite series (such as ThreadLocalRandom) or from a fixed range (such as produced by IntStream). As well as iterating over data, being able to process these in parallel and perform reductions, filtering or mapping allows these to be combined with lambdas to provide functional programming constructs in Java.
  • Extension methods provide a way of adding new methods to existing Java interfaces without requiring that classes implementing those interfaces be recompiled. This is used in a number of existing collections classes to provide interfaces for implementing streams and other utility references that would otherwise be in the Collections utility class.
  • JSR310 which adds new date and time processing to Java, to avoid the problems rampant in the java.util.Date class and related packages.
  • PermGen is no more; no longer will developers have to add -XX:PermGen to guess ahead of time how many strings will be interned in the application.
  • Nashorn adds native JavaScript support to the JVM, allowing Java and other JVM based languages to take advantage of JavaScript in their application.
  • OpenJFX brings JavaFX to the OpenJDK, setting the stage for future IDEs to be built on this as a GUI system

As well as Java8, all the major IDE vendors announced support for Java8 on the same day, with a patch available for Eclipse 4.3.2, a minor release of IntelliJ 13.1 and a new release of NetBeans 8.0 all adding Java 8 support to their respective IDEs.

InfoQ will be following up with Oracle as part of the launch webcasts next week, and bring interviews with those behind the scenes. Stay tuned for more information.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • now: java 9

    by zaxebo zaxebo,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Now they should set their eyes on next version Java 9 with features of:
    (1) Multiline string (heredoc);
    (2) Getter and setter support (through some standardised annotations)
    .


    These small things are biggest nuisance in using java. Why to use sub-featured addons for even such pretty basic tasks.

  • Re: now: java 9

    by Luke deGruchy,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    What about the lack of first-class functions, higher order functions, and proper function types? What about the lack of modularity (from what I've read, Jigsaw will supposedly not be a feature available to end users anymore) ? The lack of reified generics is also a long-standing issue.

    Desirable features that will never ever make it to Java are union and intersection types, type aliases, import aliases, algebraic types, defaulted and named parameters, and so on.

    I think Oracle has done a good job of giving Java some much needed attention, but unfortunately its age is really starting to show especially compared to the latest generation of JVM languages (Ceylon, Kotlin).

  • Re: now: java 9

    by Victor Grazi,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    No language will ever be all things to all people. Java has consistently adhered first and foremost to the requirements of stability and backward compatability, which required super human organization, insight and planning.

    Reified generics, yes, that would be great but I understand that Oracle has tried to make all of their changes without changing the byte code spec (Java 7 being the exception, with the introduction of invokedynamic).

    I personally am amazaed and grateful that we now have closures and the surrounding structures. Java will never be Groovy or Clojure, but if I need those features, I can use those languages and know that the byte code they produce is stable

  • Re: now: java 9

    by Luke deGruchy,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The one question I have is how soon will another better newer JVM language become to the go-to language for greenfield development? As you articulated well, legacy or semi-legacy development is an entirely different story.

  • Re: now: java 9

    by Victor Grazi,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Look at all of the great JVM languages, Scala, Groovy, Clojure, Haskal; they are all serious and all add value and simplicity for their particular use cases.

    But for example in financial services, project managers are _very_ squeamish about using anything other than Java and .Net. Not saying we don't have our mavericks, but the bulk of the projects in the industry are Java and .Net, and that ratio will not dilate greatly anytime soon.

    Of course the Facebooks and Tumblrs of the world will touch the water with all of these technologies, but bugs in their production systems probably don't come with much penalty. If you're building mission critical apps where millions and billions of dollars are at stake, you are not jumping to the next new great language!

  • Re: now: java 9

    by Luke deGruchy,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    First of all, Haskell is not a JVM language, and it's even older than Java:

    en.wikipedia.org/wiki/Haskell_(programming_language)

    Secondly, there are several financial companies using Haskell.

    www.haskell.org/haskellwiki/Haskell_in_industry

    Jane Street uses OCaml (www.janestreet.com/technology/). I'm sure there are other examples out there.

    So maybe you meant that the large, established financial companies stick with Java and .NET?

  • Re: now: java 9

    by Victor Grazi,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    You are right. Scratch the Haskell (Notwithstanding JHaskell). But my point remains, even though you will find pockets of financial projects using other languages (I have been guilty of producing these myself), the greta bulk will continue to be Java/.Net for the foreseeable future.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT