Java EE – can I use Java 8 syntax in a Java EE 7 project?
Sorry for this stupid beginner's question, but I can't get a clear answer:
Can I use Lambdas, method pointers, streams, etc. in Java EE 7 projects? Will this have any negative impact, or is it very difficult / error prone to set up on existing projects?
I come from a c# background, so I find it difficult to go back to Java 7 syntax, anonymous classes with runnables / labels, and there is no substitute for LINQ such as streaming, so it will be a great help
Thank you very much, Spyro
Solution
From the perspective of Java EE, Java EE 7 specification requires at least Java se 7 So obviously, nothing can stop you from using java se 8 with Java EE 7 For more details, see here
Some popular Java EE 7 containers (such as GlassFish, wildfly and Apache tomee) are compatible with Java se 8 Therefore, nothing can prevent you from using java se 8 features in Java EE 7 applications