Added working java sample