0
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!
1
This question appears to be off-topic because it is about a generic Java error rather than a Bitcoin related issue, a solution already exists at: http://stackoverflow.com/questions/17973970/how-to-solve-java-lang-noclassdeffounderror
– George Kimionis – 2014-11-30T14:52:55.283@GeorgeKimionis I disagree. It would probably be better asked on another site, but I don't think it's offtopic. – Nick ODell – 2014-11-30T15:49:01.320
@GeorgeKimionis However, thanks for finding that link. That could probably be an answer if you quoted one of the answers on that page. – Nick ODell – 2014-12-01T15:23:40.740
@NickODell please be my guest and use that link however you like. – George Kimionis – 2014-12-02T00:07:00.297