title: Why wont Intellij IDEA pickup my java JDK
body: <p>I <a href="https://stackoverflow.com/questions/10612813/intellij-idea-cant-setup-jdk">restarted and invalided caches</a> </p>
  
  <p>Here are my configs</p>
  
  <pre><code>cat /etc/environment 
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
  JAVA_HOME="/lib/jvm/java-7-oracle/jre/bin/java"
  
  ~$whereis java
  java: /usr/bin/java /usr/bin/X11/java /usr/share/java /usr/share/man/man1/java.1.gz
  ~$ which java
  /usr/bin/java
  
  
  ~$ ls -l /usr/bin/java
  lrwxrwxrwx 1 root root 22 Aug 23 14:40 /usr/bin/java -&gt; /etc/alternatives/java
  ~$ ls -l /etc/alternatives/java
  lrwxrwxrwx 1 root root 39 Aug 23 14:40 /etc/alternatives/java -&gt; /usr/lib/jvm/java-7-oracle/jre/bin/java
  </code></pre>
  
  <p>I read <a href="https://stackoverflow.com/questions/16931327/where-is-the-java-sdk-folder-in-my-computer-ubuntu-12-04/">this</a> to produce the above output. I continuously receive the red Intellij IDEA icon on my <code>Hello.java</code> file with contents of:</p>
  
  <pre><code>public class Hello {
      public static void main(String[] args){
          System.out.println("Hello World");
      }
  }
  </code></pre>
  
  <p>Despite successfully running the program from the command line as such:</p>
  
  <pre><code>$ javac Hello.java 
  $ java Hello 
  Hello World
  </code></pre>
  
  <p>Here is the Java SDK path set on Intellij IDEA settings (Ctrl+Alt+Shift+S) <code>/usr/lib/jvm/java-7-oracle</code></p>
  
  <p>Here are the contents of my directory (named Hello) Hello.iml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;module type="JAVA_MODULE" version="4"&gt;
    &lt;component name="NewModuleRootManager" inherit-compiler-output="true"&gt;
      &lt;exclude-output /&gt;
      &lt;content url="file://$MODULE_DIR$"&gt;
        &lt;sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /&gt;
      &lt;/content&gt;
      &lt;orderEntry type="jdk" jdkName="1.7 (1)" jdkType="JavaSDK" /&gt;
      &lt;orderEntry type="sourceFolder" forTests="false" /&gt;
    &lt;/component&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>I previously removed all JDK instances via <a href="https://askubuntu.com/questions/84483/how-to-completely-uninstall-java">this</a> and I am certain there is only one Java JDK installed. I re-installed Java via <a href="https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get" rel="nofollow noreferrer">this</a></p>
  
  <p>What am I doing wrong? Any insight Please?  Thank you</p>