Google Docs Java API 的构建问题
我正在尝试使用一些谷歌文档功能,我决定学习他们提供的基本教程 这里
我按照他们的指示进行操作,但在尝试运行时出现以下错误:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:118)
at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:100)
at com.google.gdata.client.Service.<clinit>(Service.java:555)
at technical.services.getDocumentList.main(getDocumentList.java:15)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 4 more
我仔细检查了我的构建路径中是否具有所需的所有依赖项,我知道它们在我的项目中得到了认可,因为当我从引用的 API 实例化对象时,IDE 不会抱怨。
任何帮助将不胜感激。
I'm trying to get some google docs functionality going and I've decided to do the basic tutorial they provide here
I followed their instructions to the T but got the following error when I tried to run:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:118)
at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:100)
at com.google.gdata.client.Service.<clinit>(Service.java:555)
at technical.services.getDocumentList.main(getDocumentList.java:15)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 4 more
I double checked that I had all of the dependencies that were required in my build path, and I know they are recognized in my project because the IDE isn't complaining when I instantiate objects from the referenced API's.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我缺少以下 Jar,这显然是需要的,但在教程中没有提到。
I was missing the following Jar which is apparently needed but not mentioned in the tutorial.