Fix bugs of Java files in the cocos2d-x-2.x demo.