This is a quick how-to, that will help you open, build and run homework 1.3 of 10gen’s Education M101J (mongodb using Java) course, using Netbeans IDE 7.3 which supports Maven 3.0.
1. Extract hw1.zip into a folder of your choice. For this example I will use “c:\tmp\hw1\“
2. Download and install Netbeans IDE 7.3 from http://www.netbeans.org. I suggest you get the bundle with all supported technologies included, although just the Java EE bundle is good for this. I will not go into details for this, there are plenty guides on netbeans site. Anyway, its a pretty straightforward installation.
3. In the Netbeans IDE go to “File > New Project“ and from Categories choose Maven and select “Project with Existing POM” as shown in the picture bellow and click “Next >“
4. Click “Finish”
5. The “Open Project” dialog should pop. Browse to the folder where you have extracted the homework files (e.g. c:\tmp\hw1\), Netbeans IDE will automatically spot the pop.xml and fill in the project details for you. Select hw1 and click the “Open Project” button.
6. Right click on the project name and select “build” in the content menu. The IDE will automatically download all dependencies and build the project.
7. Run the project. It will ask you for the main class.
That’s all, pretty cool eh?