Bethe-ansatz solution of the t-J model