title: Java Fatal Error: Unable to find package java.lang in classpath or bootclasspath
body: <p>I'm getting this error</p>
  
  <blockquote>
    <p>Error:java: Fatal Error: Unable to find package java.lang in classpath or bootclasspath</p>
  </blockquote>
  
  <p>in IntelliJ when I try to build/compile <em>any</em> project. Something that should be stated here is that NetBeans, Eclipse and even the javac command line can compile, build, and execute the same project without errors. This is why I suspect that the problem lies with IntelliJ, all other IDEs work well.</p>
  
  <p>In IntelliJ I already:
  
  <li>Restarted, reinstalled
  <li>Invalidate Caches / restarted
  <li>Deleted / readded the JDK in Project JDK
  <li>Deleted / readded the JDK in Platform Settings
  <li>Rebuild / recompile</p>
  
  <p>In Windows I already:
  <li>Deleted / Reinstalled Java SDK
  <li>Deleted / Readded the JAVA_HOME, PATH and CLASSPATH on System Variables
  <li>Tried the above on User Variables
  <li>Deleted and reinstalled IntelliJ IDEA</p>
  
  <p>I already seached for issues like this on the Internet, here on Stack Overflow I found:
  <br><a href="https://stackoverflow.com/questions/12731470/android-and-gradle-unable-to-find-java-lang-in-classpath-or-bootclasspath">Question #1</a> | <a href="https://stackoverflow.com/questions/3049433/intellij-gives-fatal-error-unable-to-find-package-java-lang-in-classpath-or-boo">Question #2</a> | <a href="https://stackoverflow.com/questions/22785896/android-javadoc-com-sun-tools-javac-util-fatalerror-fatal-error-unable-to-fin">Question #3</a> | <a href="https://stackoverflow.com/questions/14126443/netbeans-ide-7-2-1-cannot-access-java-lang-fatal-error-unable-to-find-package-j">Question #4</a> | <a href="https://stackoverflow.com/questions/20272715/fatalerror-while-creating-javadoc-unable-to-find-package-java-lang">Question #5</a>
  <br>And 30+ sites, and tried every answer...
  <br><a href="http://snag.gy/F1toR.jpg" rel="nofollow noreferrer">Here</a> you can see my IntelliJ Project Structure the last time that I tried to build/compile
  <br><br>
  I was using Java 1.8 when I got this error, after some hours, I installed Java 1.7 and the project worked fine. Maybe IntelliJ doesn't support Java 1.8?</p>
  
  <p>Anyway, it would be great if anyone knew a way to make Java 1.8 work with IntelliJ.</p>