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?
Asked
Active
Viewed 6,289 times
11
-
1Had same issue after updating, you need to set your SDK before importing projects, otherwise they default to Java 1.5. – Palcente Apr 19 '16 at 10:55
-
[Please refer to this post to get rid of JDK related issues in IntellJ configuration.](http://stackoverflow.com/a/42993827/2685581) – Ajay Kumar Mar 27 '17 at 03:50
-
https://stackoverflow.com/a/42993827/2685581 – Ajay Kumar Aug 22 '17 at 09:21
3 Answers
9
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...)

jakub
- 313
- 2
- 10
-
Thanks for the help here. Drove me crazy until I realised it had to be changed at module level as well. Argh. – Souciance Eqdam Rashti Apr 25 '16 at 08:57
1
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.

a.deshpande012
- 715
- 7
- 18
-
there was and still is JDK 1.8... I don't know why in new IDEA is project using java 5.. – jakub Apr 17 '16 at 20:45
-
@jakub can you explain what you mean? I'm afraid that I have trouble understanding your problem. – a.deshpande012 Apr 17 '16 at 21:09
-
In new IntelliJ IDEA I have problem build project (which have target JDK set upped in maven and IDEA project settings to 1.8) because there is error showing up that usage of generified classes(or types)(by example JCombobox
) is available after JDK 1.6 and IDEA is somehow using JDK 5(or 1.5). When I open same project in IDEA 15, there is no problem... – jakub Apr 17 '16 at 21:33
0
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>

Procrastinator
- 2,526
- 30
- 27
- 36

Shaheaz
- 23
- 5