jakub
jakub

Reputation: 313

IntelliJ IDEA 16 can't resolve JDK1.8

I have IntelliJ IDEA CE. I did some practice coding (had some project in maven) and I was developing it in IDEA 15 CE. Then update came and I cannot build project again, because of error: JComboBox usage generified after JDK 1.6 API which would couse compilation problem with JDK 5.0. (in maven is target JDK 1.8, in IDEA preferences is JDK1.8 and in project preferences is JDK 1.8. I Tried import settings from IDEA 15 (where it still works fine) with no difference, also I tried clean install IDEA... with no results. Any help pls?

Upvotes: 11

Views: 6449

Answers (3)

Shaheaz
Shaheaz

Reputation: 51

I added these lines in pom.xml to make maven use this version for compilation

<properties>
    <maven.compiler.source>1.8</maven.compiler.source> 
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

Upvotes: 0

jakub
jakub

Reputation: 313

Finally I find out... File -> Project Structure -> Module... And for every module I had to set version 8...(there was version 5 I don't know why...)

Upvotes: 9

a.deshpande012
a.deshpande012

Reputation: 744

You should be able to change it in File>Project Structure>Project>Project SDK and then either pick JDK 1.8 in the drop-down menu, or click 'new' and navigate to the JDK folder.

Upvotes: 1

Related Questions