title: Compiling for Java 6 using Java 7 without installing Java 6
body: <p>The target system, on which my application is supposed to run, uses Java 6. On my development machine, I have Java 7. Can I do the development, without downloading Java 6?</p>
  
  <p>I found on <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html" rel="nofollow">http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html</a> one example for cross compilation:</p>
  
  <pre><code> javac -source 1.6 -target 1.6 -bootclasspath C:\jdk1.6.0\lib\rt.jar -extdirs "" OldCode.java
  </code></pre>
  
  <p>However, this too requires the existence of a rt.jar, which belongs to Java 6. Is there a simpler way?</p>