title: Is there a way to checkout code from Bitbucker server (stash) from within Java code
body: <p>We are maintaining some JavaScript code within BitBucket. We want to be able to checkout JavaScript code from Bitbucket and be able to access the .js file within our Java application.</p>
  
  <p>Is there a way to checkout code using Java. Is there some library available which can do this for us.</p>
  
  <p>For example, when I want to checkout a git repository from git client, I would execute the command git clone <a href="https://bitbucketserverhost/PROJECT/repo.git" rel="nofollow noreferrer">https://bitbucketserverhost/PROJECT/repo.git</a>
  This will create a folder with the repo name in current directory and checkout all the source files in that folder.</p>
  
  <p>Is there a way to do git clone from within Java. Basically I want the Java code to read latest JavaScript files committed by developers within Bitbucket, access it as a file to be able to read its contents and then compare it with some other file.</p>