Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Internal use only, but not confidential
Java
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
README.md

README.md

Internal demo of Mongo with Java

The purpose of this project is to demonstrate usage of the "official" MongoDB driver for Java. I am a new Java developer, so it's likely that I am not following several best practices and cultural conventions.

Dependencies

Put mongo-2.3.jar and junit-4.8.2.jar in the base directory

Compilation instructions

javac src/Order.java -d . -classpath ./mongo-2.3.jar:.
javac src/Customer.java -d . -classpath ./mongo-2.3.jar:.
javac src/MongoRealTest.java -d . -classpath ./mongo-2.3.jar:.
javac src/MongoRealTestTest.java -d . -classpath ./mongo-2.3.jar:./junit-4.8.2.jar:.

Execution

Execute unit test

java -classpath mongo-2.3.jar:junit-4.8.2.jar:. org.junit.runner.JUnitCore MongoRealTestTest

Execute main class; insert and query documents

java -classpath mongo-2.3.jar:. MongoRealTest

TODO

Use Ant or Ivy for automated build and unit tests (?)

Something went wrong with that request. Please try again.