I just found this very useful Processing wrapper for OpenNI. It included a number of useful functionalities in OpenNI.
OpenNI in Processing – User Tracker
The second example from the Java binding of OpenNI, the User Tracker.
It crashes when I run it in the 64bit OSX environment. For the demo, I run it in a 32bit Windows 7 machine.