-2

So I have an issue that I could not change my compiler in IntelliJ. I am going to Preferences»Build, Execution, Development»Java Compiler

After I change Java 1.8 - Then I run my code and it is popping out a debug info:

"java 6 used to compile java sources"

After two: " invalid source release 1.8 " enter image description here

---- Mac OS X - installed JAVA SE kit ---

May I have to change my compiler in terminal ?

What should I wrote there ?

Can anybody help, because without it I can't even run my code.. : (

rici
  • 234,347
  • 28
  • 237
  • 341
Seelvuplee
  • 19
  • 3
  • ***Mentioning If I write in terminal Java -version, it will put out '1.8' but inside IntelliJ-idea it is used by 1.6 How can I force to change inside IntelliJ? – Seelvuplee Feb 06 '17 at 10:46
  • 1
    Possible duplicate of [Unable to set project SDK in Intellij](http://stackoverflow.com/questions/31506278/unable-to-set-project-sdk-in-intellij) – Anthony Raymond Feb 06 '17 at 10:48
  • 2
    Try File > Project Structure > Project > Project SDK – dahui Feb 06 '17 at 10:49

1 Answers1

0

Perhaps the project settings are overriding your global IntelliJ preferences. Try changing the SDK version in project structure.

In the latest version of IntelliJ I found this in:

File > Project Structure > Project tab > Project SDK
dahui
  • 2,128
  • 2
  • 21
  • 40
  • Yep. If I get out SDK, it will star using 1.8. And there I see it uses 6 instead of 8. Thank you! – Seelvuplee Feb 06 '17 at 11:02
  • But now. It works - ok. It uses 1.8 then, I got this message: source release 1.8 requires target release 1.8 Which actually the same. One thing more! – Seelvuplee Feb 06 '17 at 11:07
  • Does this help? http://stackoverflow.com/questions/29888592/errorjava-javactask-source-release-8-requires-target-release-1-8 – dahui Feb 06 '17 at 12:12