Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3315798
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:23:35+00:00 2026-05-17T22:23:35+00:00

Could someone tell me what I need to do to enable Guava support in

  • 0

Could someone tell me what I need to do to enable Guava support in GWT.

I have downloaded Guava R07 and in there there are the following two files:

  • guava-r07.jar
  • guava-r07-gwt.jar

I have a few questions regarding this:

  1. Where do these files go? I am guessing that the standard Jar is made available to my IDE for coding, and that both are made available to the GWT compiler for building the JavaScript?
  2. Do I need to add all the .gwt.xml files from the -gwt.jar into my project’s main gwt.xml file or only the portions I need?
  3. There are other Jars on the trunk of the Guava&GWT project (ie not in the download, such as one for jsr305) which I think I may need, but I’m not sure.

Sorry, normally I don’t have trouble with this kind of thing, but I can’t quite work out what goes where.

FYI I’m using GWT 1.6 for the time being, but am hoping to move to 2 soon. If Guava isn’t compatible with 1.6 that is not a problem.

Update

I have the following files in a folder called gwtlib:

  • guava-r07-gwt.jar
  • guava-r07.jar
  • jsr305-1.3.9.jar

And my Ant script does the following:

<path id="project.class.path">
    <fileset dir="gwtlibs" includes="guava-r07.jar"/>
    <fileset dir="gwtlibs" includes="guava-r07-gwt.jar"/>
    <fileset dir="gwtlibs" includes="jsr305-1.3.9.jar"/>
    <pathelement location="${gwt.sdk}/gwt-user.jar"/>
    <fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
</path>

<target name="gwtc">
    <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
        <classpath>
            <pathelement location="app"/>
            <path refid="project.class.path"/>
        </classpath>
        <jvmarg value="-Xmx256M"/>
        <arg value="-localWorkers"/>
        <arg value="2"/>
        <arg value="-war"/>
        <arg value="gwt-public"/>
        <arg value="Main"/>
    </java>
</target>

Running the above command, I get the following errors:

  • Errors in ‘jar:file:///project/gwtlibs/guava-r07-gwt.jar!/com/google/common/collect/Constraints.java’
  • Line 254: The method subList(int, int) is undefined for the type List

Without the jsr jar on the classpath, I get the following errors:

  • The import javax.annotation cannot be resolved
  • Nullable cannot be resolved to a type

Thanks

Rich

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:23:36+00:00Added an answer on May 17, 2026 at 10:23 pm

    Guava isn’t compatible with GWT 1.6. List.subList, in particular, is added to GWT in GWT 2. The earliest version that we fully supported is GWT 2.0.4

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone tell me why am I getting the following error? javax.naming.NoInitialContextException: Need to
could someone please tell me what I need to do in order to create
Could someone tell me how I would do this. I have 3 strings. $route
Could someone tell me how I can run Django on two ports simultaneously? The
Could someone tell me why the following code is outputting 0 at the marked
Could someone please tell me whether the training sample sizes for each class need
Could someone tell me if this: $.ajax({ url: 'test.html', success: function(data) { alert(Data Loaded:
Could someone tell me how I can capture a NSParseErrorException? The Situation: my app
Could someone tell me how to view the XML to be sent via web
Could someone tell me what the purpose of inner classes are? Also when designing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.