title: How to change the Javac version?
body: <p>On Windows 10, I successfully changed my java version to JDK 1.8:</p>
  <pre><code>C:\Users\Boommeister69&gt;java -version
  java version &quot;1.8.0_261&quot;
  Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
  Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
  </code></pre>
  <p>but javac doesn't change:</p>
  <pre><code>C:\Users\Boommeister69&gt;javac -version
  javac 11.0.7
  </code></pre>
  <p>when I <code>echo %PATH%</code> this is the result:</p>
  <pre><code>C:\Users\Boommeister69&gt;echo %PATH%
  C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
  
  C:\Program Files\AdoptOpenJDK\jdk-11.0.7.10-hotspot\bin;
  
  C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)\Intel\iCLS Client\;
  C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;
  C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
  C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
  C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
  C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
  C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;
  C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;
  C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Git\cmd;C:\Program Files\MariaDB 10.5\bin;
  
  C:\Program Files\Java\jdk1.8.0_261\bin;
  
  C:\Program Files\PuTTY\;C:\Program Files\CMake\bin;C:\Program Files\Amazon\AWSSAMCLI\bin\;
  
  C:\Program Files\Java\jdk1.8.0_261\bin;
  
  C:\Users\Boommeister69\AppData\Local\Microsoft\WindowsApps;C:\Users\Boommeister69\AppData\Roaming\npm;
  C:\Users\Boommeister69\AppData\Local\Temp\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin;
  C:\Program Files\heroku\bin;
  C:\workspace\play-samples-play-java-hello-world-tutorial;C:\Program Files\Maven\apache-maven-3.6.3\bin;
  C:\Users\Boommeister69\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Docker Toolbox;
  </code></pre>
  <p>So I have 3 paths showing up there with Java JDKs, the first JDK path is still set to Java 11. I think this is the problem, but I don't know how to change this? And why are there so many paths showing up, shouldn't <code>echo %PATH%</code> only return the system environment path variables?</p>
  <p>These are my system environment path variables:</p>
  <p><a href="https://i.stack.imgur.com/8KRwi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8KRwi.png" alt="path variables" /></a></p>
  <p>and my JAVA_HOME variable:</p>
  <p><a href="https://i.stack.imgur.com/Hq1MN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hq1MN.png" alt="Java-Home varaible" /></a></p>
  <p>I also changed the SDK in my IntelliJ, altough I don't think this has something to do with javac:</p>
  <p><a href="https://i.stack.imgur.com/kp7la.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kp7la.png" alt="Project SDK" /></a></p>
  <p><a href="https://i.stack.imgur.com/vJ0LO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vJ0LO.png" alt="Modules SDK" /></a></p>
  <p><a href="https://i.stack.imgur.com/W48V4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W48V4.png" alt="Platform SDK" /></a></p>