Is there a possibility to check if a mongo database allready exists?
Try this, it worked for me (on Mac OSx)
MongoClient mongoClient = new MongoClient("localhost"); /** **/ boolean dbExist = mongoClient.listDatabaseNames(). into(new ArrayList()).contains("TEST"); System.out.print(dbExist);