RSS Feed Subscribe to RSS Feed

 

Java8

Java8 isn’t scheduled for for release until March 2014, but early release versions have been available for a while.
Some of the most interesting new features are:

  • Streams
  • Functional interfaces
  • Default methods
  • Lambdas
  • Java Time

(more…)

Tags: ,

Using Java8 with Maven in IntelliJ (invalid target release: 1.8)

I recently started trying out the early access version of Java8. When I tried using it with maven in IntelliJ however, I got the following error when I ran the maven install command:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project xyz:

Fatal error compiling: invalid target release: 1.8\

Although I saw some suggestions on stackoverflow here about hardcoded JAVA_HOME paths, the solution was just changing the maven specific version of Java that IntelliJ uses. This can be done via:

File > Settings > Project Settings > Maven > Runner

and selecting the 1.8 version of the JRE.

Tags: , , , ,