title: Downgrade Eclipse ant to compile while using older JDK libraries (Java 1.7 -> 1.6)
body: <p>I have the opposite problem as <a href="https://stackoverflow.com/questions/4267760/upgrade-eclipse-java-compiler">Upgrade Eclipse java compiler</a>: I'm using Eclipse 3.7.1 that <em>can</em> support JDK 1.7, but right now I am developing for JDK 1.6... which has been working fine, but suddenly I'm getting tons of errors like this when I do an ant build (see below).</p>
  
  <p>I want to use JDK 1.6; where do I set that? Eclipse is set properly (Java Build Path for each project points to JRE System Library [jdk1.6.0_16]), but ant seems to be disregarding it.</p>
  
  <pre><code>[javac] warning: java\nio\ByteBuffer.class(java\nio:ByteBuffer.class): major version 51 is newer than 50, the highest major version supported by this compiler.
  [javac] It is recommended that the compiler be upgraded.
  [javac] warning: java\lang\Object.class(java\lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
  [javac] It is recommended that the compiler be upgraded.
  [javac] warning: java\util\Collections.class(java\util:Collections.class): major version 51 is newer than 50, the highest major version supported by this compiler.
  [javac] It is recommended that the compiler be upgraded.
  [javac] warning: java\util\EnumMap.class(java\util:EnumMap.class): major version 51 is newer than 50, the highest major version supported by this compiler.
  [javac] It is recommended that the compiler be upgraded.
  </code></pre>
  
  <hr>
  
  <p>update: More clues -- this is the first time I've built this particular project in a separate Eclipse workspace that imports the project from a previous workspace. I switched back to the old workspace and built the same project and it builds fine.</p>
  
  <p>The difference seems to be that ant runs in a 1.7 JRE in my new workspace, but ant runs in a 1.6 JRE in my old workspace. What gives? Where do I set this? I can't seem to figure out which setting is different.</p>