Java API for the list command.