私はいくつかのことを機能させようとしているので、いくつかのGoogleアプリエンジンJavaを試すことができます. しかし、私は手に入れることができない何かに問題があるようです。
Java コードは次のようになります。
import java.net.URL;
import com.google.gdata.client.photos.*;
import com.google.gdata.data.photos.*;
public class TestPicasa {
public static void main(String[] args) {
try {
PicasawebService service = new PicasawebService("Picasa test");
service.setUserCredentials("username@gmail.com", "password");
URL feedURL = new URL("http://picasaweb.google.com/data/feed/api/user/username?kind=album");
UserFeed feed = service.getFeed(feedURL, UserFeed.class);
for (AlbumEntry entry : feed.getAlbumEntries()) {
System.out.println(entry.getTitle().getPlainText());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
mail.jar、activation.jar、servlet-api.jar、gdata-client、gdata-client-meta、gdata-core、gdata-media、gdata-photos-2.0.jar、および gdata-photos-meta- を参照しました。 2.0.jar はgoogleの指示に従います。
そして、コンソールに次のエラーが表示されます。
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:532)
at TestPicasa.main(TestPicasa.java:10)
私が見逃したものについて何か考えはありますか?