It depends. In many cases, if the sexual jokes are aimed at someone or make someone feel uncomfortable, they could be interpreted as harassment, especially if other unacceptable behaviors accompany them.