Using a Java Client with MongoDB: Setting Up the Environment

We need to download and install the following software.

  1. MongoDB 3.0.5 binary distribution mongodb-win32-x86_64-3.0.5-signed.msi from mongodb.org/downloads. Stable Release (3.0.5) for Windows 64-bit is used in this chapter.
  2. Eclipse IDE for Java EE Developers from eclipse.org/downloads.
  3. Java 5 or later (Java 7 used) from oracle.com/technetwork/java/javase/downloads/index.html.

Double-click on the MongoDB binary distribution to install MongoDB. Add the bin directory (C:\Program Files\MongoDB\Server\3.0\bin) of the MongoDB installation to the PATH environment. Create a directory C:\data\db for the MongoDB data. Start the MongoDB server with the following command.

>mongod

The MongoDB server gets started as shown in Figure 1-1.

Source: Vohra Deepak (2015), Pro MongoDB™ Development, Apress; 1st ed. edition.

Leave a Reply

Your email address will not be published. Required fields are marked *