Java filesystem SPI (JSR-203) over DropBox API.
- Download the chromedriver executable and locate it into some directory.
- Don't forget to run jvm with jvm argument
-Dwebdriver.chrome.driver=/usr/local/bin/chromedriver
.
- Don't forget to run jvm with jvm argument
First of all, you MUST have a Dropbox account. Then you need to register an application. This application must have full access, and handle any types of files.
Next, prepare 2 property files.
- application credential
$ cat ${HOME}/.vavifuse/dropbox.properties
dropbox.applicationName=your_application_name
dropbox.clientId=your_client_id
dropbox.clientSecret=your_client_secret
dropbox.redirectUrl=http://localhost:30000
dropbox.scopes=files.content.write
- user credential
$ cat ${HOME}/.vavifuse/credentials.properties
dropbox.password.xxx@yyy.zzz=your_password
Then write your code! Here is a short example (imports omitted for brevity):
public class Main {
public static void main(String[] args) throws IOException {
String email = "xxx@yyy.zzz";
URI uri = URI.create("dropbox:///?id=" + email);
FileSystem fs = FileSystems.newFileSystem(uri, env);
:
}
}
project name to vavi-nio-file-dropbox- rename main branch