Cannot compile source code of Intellij-Community

Answered

I follow this tutorial: http://www.jetbrains.org/intellij/sdk/docs/basics/checkout_and_build_community.html

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.zip.ZipEntry>,java.util.Comparator<java.util.zip.ZipEntry>)
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 java.util.zip.ZipEntry> cannot be converted to java.util.Comparator<? super capture#1 of ? extends java.util.zip.ZipEntry>))

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 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html should work fine.

1

Please sign in to leave a comment.