title: Ant build keeps saying class file has wrong version 52.0, should be 50.0
body: <p>I set 1.6 java for a legacy project ant build, and I am really running out any idea what can be wrong  </p>
  
  <p>Here is what I see:</p>
  
  <p>java -version</p>
  
  <pre><code>Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=ISO-8859-2
  java version "1.6.0_45"
  Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
  Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
  </code></pre>
  
  <p>javac -version:</p>
  
  <pre><code>Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=ISO-8859-2
  javac 1.6.0_45
  </code></pre>
  
  <p>while building ant:</p>
  
  <pre><code> [echo] Java/JVM version: 1.6
   [echo] Java/JVM detail version: 1.6.0_45
  </code></pre>
  
  <p>It seems to be correctly in environment variables:</p>
  
  <pre><code>JAVA_HOME = 'C:\Program Files\Java\jdk1.6.0_45'
  PATH = ...'%JAVA_HOME%\bin'... (note, I tried with full path too, no progress)
  </code></pre>
  
  <p>I checked Windows\system32, no other versions there</p>
  
  <p>I even reinstalled Java 1.6 to make sure it is not spoiled.</p>
  
  <p>After all these Ant build keeps saying class file has wrong version 52.0, should be 50.0, what else can be wrong?</p>