title: How to resolve: [javac] This version of java does not support the classic compiler; upgrading to modern
body: <p>Our company recently moved our build environment from our local machine to a docker shell. It caused an old tool that used ant and java to compile to fail. I'm not familiar with compiling java so please bear with me.</p>
  
  <p>We've installed:</p>
  
  <ul>
  <li>ant version 1.7.1</li>
  <li>java and javac version 1.7.0_141</li>
  </ul>
  
  <p>Now the tool compiles but has following error/warning:</p>
  
  <pre><code>[javac] This version of java does not support the classic compiler; upgrading to modern
  </code></pre>
  
  <p><strong>Would you know what is the cause of this? Is it a mismatch between ant 1.7.1 vs. the java version?</strong></p>
  
  <p>I added fork="true" in the ant build .xml file, and the error/warning went away. I don't understand why?</p>
  
  <pre><code>&lt;javac destdir="classes"
         debug="on"
         includeantruntime="false"
         fork="true" &gt;                 // &lt;-- Somehow fork="true" got rid of warning/error.
  </code></pre>