title: Javac Cross-Compilation with 1.7
body: <p>So guys,</p>
  
  <p>I'm trying to play a bit with Javac Cross compilation with Ant and on terminal. Locally and on an integration environment and i'm having the same problem on the very basic problem.</p>
  
  <p>I run this in the linux terminal (and also on my cygwin on windows and the cmd):</p>
  
  <pre><code> javac -target 1.6 -source 1.7 -bootclasspath /usr/java/jdk1.6.0_27/jre/lib/rt.jar Main.java
  </code></pre>
  
  <p>with Main.java with nothing other than a System.out.println.</p>
  
  <pre><code>javac -version ==&gt; javac 1.7.0_11
  </code></pre>
  
  <p>I'm getting the error message:</p>
  
  <pre><code>javac: source release 1.7 requires target release 1.7
  </code></pre>
  
  <p>I have roughly the same configuration on my local windows machine with the exact same results.</p>
  
  <p>It was my understanding that cross compilation is all about compiling some source code that is compatible with a higher version jdk using that higher version of jdk, but passing the rt.jar of the target version that is supposedly lower.</p>
  
  <p>if target and source are the same, it worked.</p>
  
  <pre><code>target=1.7 and source=1.7 workd fine
  
  target=1.6 and source=1.6 worked just fine
  </code></pre>
  
  <p>but i want cross-compilation, so what is it that i'm doing wrong?</p>
  
  <p>I appreciate all the help I could get and thanks in advance.</p>