The simplest way to compile this and all examples is to go to the $JONAS_ROOT/examples/src directory and enter the command as user jonas:
ant -find build.xml install