Add two java checks