Fixing Java examples pointing to the wrong branch, and updating to 0.4.2