title: Which JDK's distributions can run `javac -source 1.6 -target 1.5`?
body: <p>NOTE:  Please do <em>not</em> comment on all the perils of cross-compiling.  Thank you.</p>
  
  <hr>
  
  <p>I have a situation where we need to have Java 6 source compiled for a Java 5 JVM (to be sure that JAX-WS usage is correct).  Previously we have done this with ant ant script (which apparently can), but after migrating to Maven we have found that it ends up with javac complaining:</p>
  
  <pre><code>$ javac -source 1.6 -target 1.5
  javac: source release 1.6 requires target release 1.6
  </code></pre>
  
  <p>Is there <em>any</em> Java distribution for Linux (Ubuntu 11.10, x86) where the javac can do this?</p>
  
  <hr>
  
  <p>EDIT:  It appears not, as the limitation is in javac which is the same.  The solution (which made this need go away) was to change from the default javac compiler to the eclipse compiler in maven-compiler-plugin.</p>
  
  <hr>
  
  <p>EDIT: I've found that the Eclipse compiler generates byte code for anonymous inner classes that the javadoc utility disagrees with.  I am preparing a bug report for this issue.</p>