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:
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.