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 7685661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:18:07+00:00 2026-05-31T19:18:07+00:00

I have a java code where I want to use Guava libraries CharMatcher function.

  • 0

I have a java code where I want to use Guava libraries CharMatcher function. I downloaded it, but can’t able to add it to my existing code. Can anybody help me how to add that .jar file to the java code (step-by-step). I am using JDK 1.6. Thanks in advance.

I am using the following command:

enter image description here

And Used follwing code:

public class Test {

 public static void main(String[] args) {

try {

 String key = "hello";
 Multimap<String, Integer> myMap = HashMultimap.create();
 myMap.put(key, 1);
 myMap.put(key, 5000);
 System.out.println(myMap.get(key));

}

 catch (FileNotFoundException e) {
  System.out.println(e);
  } catch (Exception e) {
  System.out.println(e);
  }


}
}

I store Guava Library and Test.java in C:\Program Files\Java\jdk1.6.0_25\bin . Can anybody help me where is the problem because it is showing errors.

  • 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-31T19:18:09+00:00Added an answer on May 31, 2026 at 7:18 pm

    Suppose you are using Eclipse as IDE, here is the picture:
    enter image description here

    EDIT: if you don’t use any IDE, you just must use CLASSPATH variable:

    javac -classpath path_to_your_jar/yourjar.jar your_code.java
    

    ‘-classpath’ or ‘-cp’ switch gives you possibility to tell javac where your libraries are located.
    See link for further reference.

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

Sidebar

Related Questions

I have this Java code, and I want to do the same thing in
I have a standalone Java app that has some licensing code that I want
I have existing java code and need to create Design Document based on that.
I have some java code that I want to share with some classmates however
I have a Java application and I want to use SQL database. I have
I have a Java Swing application client that I want to use to consume
I want to generate java code from xsd using JAXB 2.1 XJC. I have
I found a java code and want to use it in my project. It
I have this java code and i want to return 2 values and then
I have java code written in eclipse and I want to show some basic

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.