Added Java motion detection