我开始开发一些Dropbox应用。我坚持授权。 这是我的代码:
package ubox.model;
import com.dropbox.core.*;
import java.util.Locale;
public class DXauth
{
private DbxWebAuthNoRedirect webAuth;
public void auth() //throws IOException, DbxException
{
final String APP_KEY = "foo";
final String APP_SECRET = "foo";
DbxAppInfo appInfo = new DbxAppInfo(APP_KEY, APP_SECRET);
DbxRequestConfig config = new DbxRequestConfig("JavaTutorial/1.0", Locale.getDefault().toString());
webAuth = new DbxWebAuthNoRedirect(config, appInfo);
}
public String getAuthorizeUrl()
{
return webAuth.start();
}
}
我收到了这样的错误消息:
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonParseException
at com.dropbox.core.DbxAppInfo.<clinit>(DbxAppInfo.java:112)
at ubox.model.DXauth.auth(DXauth.java:17)
at Main.main(Main.java:17)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonParseException
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:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more
我已经包含了从dropbox构建路径的jar。有什么建议?感谢。