Eclipse + Java 8 + Dynamic Web Module

2019-04-06 15:23发布

问题:

I'm starting a new project and considering moving to Java 8 already, since newest Spring Framework 4.0 supports it, and it's not so long until final release this march.
Currently we are using STS 3.4 (Eclipse 4.3.1 based) and I have installed latest JDK8 and Java 8 (BETA) support. Simple projects seems to find themselves at home with Java 8, but not UI project (Dynamic Web Module 3.0, the one deployed on server). I'm getting error that compiler version (1.8 BETA) doesn't match installed project facet "Java" (1.7). And there is no such option "1.8" in "Java" project facet...
Have anybody succeeded running UI project with Java 8?
Thanks!

回答1:

Have you tried to install WTP's org.eclipse.jst.common.fproj.enablement.jdt.feature.patch from here?

http://download.eclipse.org/webtools/patches/drops/R3.5.2/P-3.5.2-20140329045715/repository

You might also want support for Java 8 in Maven, PDE, and JDT.

For those features, use these sites:

  • Maven (M2E) 1.4.1 (org.eclipse.m2e.feature) http://download.eclipse.org/technology/m2e/releases/1.4/1.4.1.20140328-1905

  • JDT & PDE Feature patches : http://download.eclipse.org/eclipse/updates/4.3-P-builds/

If you happen to be a fan of JBoss Tools, it's coming directly to JBoss Central:

https://issues.jboss.org/browse/JBIDE-17002