Getting NoClassDefFoundError while adding external jar library

I was trying to add this library by using this prebuilt jar file in a Netbeans project.
So, I pasted jar file in Libraries.
then used in code

import com.google.common.geometry.*;

public class JavaApplication1 {
    private static S2LatLng latl;
    private static S2CellId cell;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        latl = S2LatLng.fromDegrees(-30.043800, -51.140220);
        System.out.println(latl);
        cell = S2CellId.fromLatLng(latl);
        cell.level();
    }
}

It gives output as:

run:
(-0.5243632298106724, -0.8925652191942545)
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
    at com.google.common.geometry.S2.posToIJ(Unknown Source)
    at com.google.common.geometry.S2CellId.initLookupCell(Unknown Source)
    at com.google.common.geometry.S2CellId.<clinit>(Unknown Source)
    at javaapplication1.JavaApplication1.main(JavaApplication1.java:24)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 4 more
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

throwing NoClassDefFoundError Exception. What am I doing wrong?