title: How to export a mongo collection to json file from java
body: <p>I want to perform the mongoexport functionality within a java program. That is I want something similar to mongoexport -db myDatabase --collection Page --out Page.json</p>
  
  <p>Is there a way this can be done using java programming?</p>