Building a application in netbeans is much more straight forward than the command line. The run menu contains all of the required actions.
run - Will compile and run the project
build - will compile but not run
Also you can click on the run icon which looks like a play button as shown below.
When you build for the first time the build and dist directories will be produced.