NoClassDefFoundError when using Java Coinbase API I've simply downloaded an API .jar file of a Coinbase. I've created a project dynamic web project. I added successfully into a reference library that API. 

Here is my simple program:

import com.coinbase.api.Coinbase;
import com.coinbase.api.CoinbaseBuilder;

public class Main {
    public static void main(String[] args){

        try {

            Coinbase cb=new CoinbaseBuilder()
            .withApiKey(System.getenv("My API KEY"), System.getenv("MY API SECRET"))
            .build();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


As i run this program, it says: 

Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/type/TypeReference
    at com.coinbase.api.CoinbaseBuilder.build(CoinbaseBuilder.java:16)
    at Main.main(Main.java:11)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.type.TypeReference
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 2 more


Do I need to put something here? I'm did checked thrice, My API key is correct!
Well the problem is that the Coinbase Java Api depends on the Jackson JSON processor, along with several other dependencies that can be found here, and I'm assuming that the jar that you download didn't come with all of these dependencies packaged inside it which means that they won't be on your classpath just because you've added the coinbase jar. You could either try to resolve these dependencies manually, which would be incredibly tedious and unnecessary, or you could use a build automation tool. Considering that the Coinbase Java API was built with it in mind I would recommend setting your project up to use Maven.