java.lang.ClassNotFoundException:com.google.api.client.json.JsonFactory [英] java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory

查看:2042
本文介绍了java.lang.ClassNotFoundException:com.google.api.client.json.JsonFactory的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在osx 10.8上用JRE JavaSE-1.6创建一个在Tomcat 7.0上运行的Web应用程序。
我使用的是开发者网站的教程,当我尝试调用时发生错误。

I want to create a web application running on Tomcat 7.0 with JRE JavaSE-1.6 on osx 10.8. I am using a tutorial from the developers site and the error occurs when I try to call

clientSecrets = GoogleClientSecrets.load(new JacksonFactory(), reader);

我添加了Jar google-http-client-jackson-1.16.0-rc。 jar 到我的构建路径,仍然会出现以下错误:

I added the Jar google-http-client-jackson-1.16.0-rc.jar to my build path and still get following error:

java.lang.NoClassDefFoundError: com/google/api/client/json/JsonFactory
java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory

我的classpath特别指向这个Jar。

My classpath specifically points to this Jar too.

推荐答案

我有类似的问题,并通过手动解决将所需的JAR添加到Eclipse外部的WEB-INF \ lib文件夹中。

I had a similar problem and solved it by manually adding the required JAR's to my WEB-INF\lib folder outside Eclipse.

这篇关于java.lang.ClassNotFoundException:com.google.api.client.json.JsonFactory的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆