如何运行简单的比特币程序?

时间:2014-11-30 09:58:25

标签: java bitcoin coinbase-api

我只是下载了.jar的API Coinbase文件。我创建了一个项目dynamic web project。我将API成功添加到参考库中。

这是我的简单程序:

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();
        }
    }
}

当我运行这个程序时,它说:

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

我需要在这里放一些东西吗?我检查了三次:我的API密钥是正确的。

0 个答案:

没有答案