Java 8 introduces many new features. A list of the corresponding Java Enhancement proposals is available at

This article describes some of these new features, especially those which are related to the language (syntax and semantics) and to new methods and classes in the API. This is still work in progress, so new sections will be added over time.

The Java8 API documentation is available at

Since Java 8 also introduces new language features, current IDEs often do not yet fully support the new version – for example, for Eclipse, an Java 8 enabled version is necessary. A pre release version can be downloaded from

I was using a different approach, and used a simple ant build file to build the Java 8 related code samples. The build file looks similar to this:

<project name="java8" default="run" basedir=".">
  <property name="src" value="src"/>
  <property name="build" value="bin"/>

  <target name="run" depends="build">
    <java classname="com.example.java8.Main">
           <pathelement location="${build}">

  <target name="build" depends="clean">
    <mkdir dir="${build}"/>
    <javac srcdir="${src}" destdir="${build}">
        <compilerarg value="-parameters">

  <target name="clean">
    <delete dir="${build}">


All code samples are also available in my github repository at