title: IntelliJ error - java: try-with-resources is not supported in -source 1.6 error. Even though in project settings 1.7 JDK is selected
body: <p>Under File -> Project Structure -> SDKs i have 1.7 jdk but i still get this error:</p>
  
  <p>added.java: try-with-resources is not supported in -source 1.6
    (use -source 7 or higher to enable try-with-resources)</p>
  
  <p>I have restarted IDE but to no avail</p>