Java samples CR enhancements