US District Judge Richard Seeborg said much of the alleged harassment, even if true, constituted protected political speech that UC Berkeley had no obligation to stop.
The San Francisco Chronicle reports that Seeborg issued his ruling last week.
The plaintiffs, a current student and a recent graduate, said the harassment included checkpoints at an annual event protesting Israeli policies.
Demonstrators in military attire and carrying fake weapons at the checkpoints allegedly asked passing students whether they were Jewish.
The event, Apartheid Week, is held by Muslim student groups.
Joel Siegal, a lawyer for the plaintiffs, said his clients are reviewing their options.