You can change the version of Java used in Java EE project by changing the value of the Java facet.
The Java facet applies only to J2EE projects. To set Java Compiler level of a non-Java EE project, such as a Java project, see Java Compiler
Step to changing Java Compiler version.