How can I download files from SharePoint using Java?

I need to download all files under a folder using JavaAPI


2 Answers 2


I presume you mean JavaScript, not the other (older) programming language Java.

You can not download files with JavaScript as it runs in the Browser
and can not write to you local FileSystem

Note: you can generate a file with JavaScript and ask the user to save the file

For accesing SharePoint and extracting content you can use PowerShell, or .Net

and yes.. you can do it with Java as well (if you really want)
(that other programming language which is NOT JavaScript)

Purists will say you can do it with JavaScript as NodeJS uses JavaScript

You could also open the Library (from IE browser only) with 'Open in Explorer' and copy the contents by hand

then you could map that folder as a Network Mapping
and use good old (way older than Java) .batch file scripting

  • Java is older than JavaScript? They where both released in 1995 so it must be a close call ;) Commented Jan 13, 2016 at 9:27
  • No, Java is from '90 or '91 .. or I was in a programming Matrix/Star Trek timewarp trap ☕ .. I worked for the uni so it may not have been publically available yet Commented Jan 13, 2016 at 11:44
  • Probably, Wikipedia states 95 for both languages :) Commented Jan 13, 2016 at 13:04

Some useful examples you can find here http://www.independentsoft.de/jshare/tutorial/index.html

JShare is SharePoint API for Java and Andoid

  • I tried JShare but it not running.My SharePoint version is 10.
    – Hadoop
    Commented Jan 19, 2016 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.