2017-08-03 MongoDB how to use MongoDB Java driver in your env config your depends manager(maven etc), like this or download jar package from here , add this jar file to your build path write your sample code like this run and test it, please make sure your mongod is start Newer compile/install C++ driver for MongoDB fail Older how to install/compile MongoDB C driver