Project "MyProject" has a higher compiler option than running Eclipse
2 answers
The problem was that Eclipse was running under a different JVM than the one listed in my project (I have two JDKs installed on my machine) to solve that I just changed the eclipse.init file to ensure it starts Eclipse corresponding JVM.
This is what I added to eclipse.init (you need to use your exact path to javaw.exe
):
-vm
C:\Program Files\Java\jdk1.6.0_45\bin\javaw.exe
Further information on the eclipse.init file can be found here .
+8
source to share
You seem to be using maven, so you need to configure it in the compiler for your POM
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
[...]
</build>
[...]
</project>
for more details check this example
0
source to share