Cannot compile source code of Intellij-Community


I follow this tutorial:

I configure the "IDEA jdk" pointing to jdk 1.8.

When I configured it pointing to jdk 1.6, it gave me

Error:java: javacTask: source release 1.8 requires target release 1.8

So I point it to jdk 1.8 (and the tools.jar is already in the lib folder), it gives me:

Error:(292, 18) java: no suitable method found for sort(java.util.List<capture#1 of ? extends>,java.util.Comparator<>)
method java.util.Collections.<T>sort(java.util.List<T>) is not applicable
(cannot infer type-variable(s) T
(actual and formal argument lists differ in length))
method java.util.Collections.<T>sort(java.util.List<T>,java.util.Comparator<? super T>) is not applicable
(cannot infer type-variable(s) T,T,U
(argument mismatch; java.util.Comparator<capture#1 of ? extends> cannot be converted to java.util.Comparator<? super capture#1 of ? extends>))

Pls help! TAT


ps: I did configure it as a jdk. 


1 comment
Comment actions Permalink

1.8.0_25 is too old, try a more recent build.

8u131 from should work fine.


Please sign in to leave a comment.