I'm trying to use Guava in a GWT project without success (a HashMultimap, to be precise). I get a never-ending list of stacktraces for classes:
- com.google.common.collect.ComparisonChain
- com.google.common.collect.ForwardingSortedSetMultimap
- com.google.common.collect.Ordering
- ...
Each stack trace is along the lines of:
- line xx: the import javax.annotation cannot be resolved
- line xx: Nullable cannot be resolved to a type
- line xx: Nullable cannot be resolved to a type
- line xx: Nullable cannot be resolved to a type
- ...
Looking at the code, each file that throws an error includes:
import javax.annotation.Nullable;
and, looking at the guava-src-r07.jar, each mentioned classes uses a @Nullable annotation.
I'm using JDK6 and looking at the JDK6 javadoc and...well, I can't find any such annotation. Can I get these libraries to work with a GWT project and JDK6?
P.S. - What version of Java are you using over there?