简体   繁体   中英

Eclipse: javac: target release 1.6 conflicts with default source release 1.7

I am trying to perform a build on Eclipse Kepler but when I do so I get the following error javac: target release 1.6 conflicts with default source release 1.7

I have changed the Java Compiler to use 1.6 but this warned me that the default JRE was 1.7. I then went to Installed JREs removed 1.7 and created a new one for 1.6.

This still gives the sames error. I also saw something about adding -vm and the java path to eclipse.ini but this didnt help either.

Does anyone know what to do?

You may want to check the project or workspace's compiler settings and verify that the Java source and target versions are the same:

  1. Right click the project in the package explorer and select 'properties'
  2. Select "Java Compiler" in the left pane.
  3. If "Enable project specific settings" is not set, then click on "Configure Workspace Settings..."
  4. Verify that the source and target are 1.6 if that's what you intend to use

Here's a link to a similar error when using javac from the commandline: Can we use jdk7 javac to compile code with java7 features into java6 bytecode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM