Google云端硬盘快速入门指南警告

时间:2013-06-26 18:01:14

标签: java google-drive-api

以下是错误。

WARNING: Application name is not set. Call Builder#setApplicationName.

Exception in thread "main" java.io.FileNotFoundException: document.txt (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at com.google.api.client.http.FileContent.getInputStream(FileContent.java:71)
    at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:361)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:418)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
    at DriveCommandLine.main(DriveCommandLine.java:56)

1 个答案:

答案 0 :(得分:-1)

快速入门应用程序将document.txt文件从本地文件系统上传到云端硬盘。在执行代码之前,请将任何名为document.txt的文件放在应用程序的工作目录中。