Configure Maven to use Java 8 for Compile the code
In pom.xml we can configure maven.compiler.sourcemaven.compiler.target properties to tell Maven to use Java 8 (or particular Java version ) to compile the project.
Setting the -source and -target of the Java Compiler
Sometimes when you may need to compile a certain project to a different version than what you are currently using. The javac can accept such command using -source and -target.
We can configure Java Version using Maven properties. Sample Maven properties for Java 7 and Java 8 given below.
Maven Properties
Java 7pom.xml
1.71.7
Java 8pom.xml
1.81.8
Alternatively we can configure Java Version using Maven Compiler plugin.
Java 8 Stream Filter with map Example
In this article we are going to see about Java 8 Stream filter() , findAny() and orElse() with map() multiple conditions example program.
Employee.java
package com.javatutorialcorner.java8;
…Read More
Java 8 Stream Filter with multiple conditions Example
In this article we are going to see about Java 8 Stream filter() , findAny() and orElse() with multiple conditions example program.
Employee.java
package com.javatutorialcorner.java8;
public…Read More
Java 8 Stream Collectors groupingBy Example
In this article we are going to see about Java 8 Stream Collectors groupingBy with example program.
StreamGroupBy.java
package com.javatutorialcorner.java8;
import java.util.ArrayList;
import java.util.Lis…Read More
Java 8 Stream Collectors groupingBy with sort Example
In this article we are going to see about Java 8 Stream Collectors groupingBy with sort example program.
StreamGroupBy.java
package com.javatutorialcorner.java8;
import java.util.ArrayList;
import java.uti…Read More
0 comments:
Post a Comment