The evidence gathered by the prosecutor justifies the establishment of such a trial, said the judge Elizabeth McHugh.
Following the judgment, the judged wished "good luck" to the actor, who simply said "Thank you".
Bill Cosby is thus heading towards a trial, unless he decides to plead guilty and to submit to judgment.
The 78 years old, Bill Cosby was arrested last December. He is accused of drugging and raping Andrea Constand in 2004, a former employee of Temple University, the alma mater of the actor.
If the court finds him guilty, the former star of The Cosby Show is liable to a maximum penalty of 10 years in prison.
In 2005, Bruce Castor, the former district attorney of Montgomery County, refused to bring charges of sexual assault against Bill Cosby. He considered his decision binding its successors and refused to open any new lawsuits against the actor and comedian.
The case was reopened last summer.
Subsequently, dozens of other women accused Bill Cosby of having assaulted them, some of them dating back even to the 60s.